mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 12:37:06 +08:00
Fix travis on Windows with gtests.
This commit is contained in:
parent
76b216dd5e
commit
e1782cf9b9
10
.travis.yml
10
.travis.yml
@ -8,7 +8,7 @@ script:
|
||||
- cd build
|
||||
- cmake .. -DFTXUI_BUILD_TESTS=ON
|
||||
- cmake --build .
|
||||
- ./tests --gtest_color=yes
|
||||
- "${FTXUI_TEST_EXE}"
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
@ -19,14 +19,22 @@ jobs:
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: gcc
|
||||
env:
|
||||
- FTXUI_TEST_EXE="./tests --gtest_color=yes"
|
||||
|
||||
# Ubuntu
|
||||
- os: linux
|
||||
dist: bionic
|
||||
compiler: clang
|
||||
env:
|
||||
- FTXUI_TEST_EXE="./tests --gtest_color=yes"
|
||||
|
||||
# OS X
|
||||
- os: osx
|
||||
env:
|
||||
- FTXUI_TEST_EXE="./tests --gtest_color=yes"
|
||||
|
||||
# Windows
|
||||
- os: windows
|
||||
env:
|
||||
- FTXUI_TEST_EXE="./Debug/tests.exe --gtest_color=yes"
|
||||
|
@ -152,13 +152,14 @@ export(TARGETS screen dom component NAMESPACE ftxui::
|
||||
|
||||
|
||||
if (FTXUI_BUILD_TESTS AND ${CMAKE_VERSION} VERSION_GREATER "3.11.4")
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
FetchContent_Declare( googletest
|
||||
GIT_REPOSITORY "https://github.com/google/googletest"
|
||||
GIT_TAG master
|
||||
GIT_TAG release-1.10.0
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(googletest)
|
||||
@ -185,11 +186,12 @@ if (FTXUI_BUILD_TESTS AND ${CMAKE_VERSION} VERSION_GREATER "3.11.4")
|
||||
|
||||
target_link_libraries(tests
|
||||
PRIVATE component
|
||||
PRIVATE gtest gtest_main
|
||||
PRIVATE gtest
|
||||
PRIVATE gmock
|
||||
PRIVATE gtest_main
|
||||
)
|
||||
|
||||
set_property(TARGET tests PROPERTY CXX_STANDARD 17)
|
||||
add_test(tests tests)
|
||||
endif()
|
||||
|
||||
if(FTXUI_BUILD_EXAMPLES)
|
||||
|
Loading…
Reference in New Issue
Block a user