mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 04:31:34 +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
|
- cd build
|
||||||
- cmake .. -DFTXUI_BUILD_TESTS=ON
|
- cmake .. -DFTXUI_BUILD_TESTS=ON
|
||||||
- cmake --build .
|
- cmake --build .
|
||||||
- ./tests --gtest_color=yes
|
- "${FTXUI_TEST_EXE}"
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
@ -19,14 +19,22 @@ jobs:
|
|||||||
- os: linux
|
- os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
env:
|
||||||
|
- FTXUI_TEST_EXE="./tests --gtest_color=yes"
|
||||||
|
|
||||||
# Ubuntu
|
# Ubuntu
|
||||||
- os: linux
|
- os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
env:
|
||||||
|
- FTXUI_TEST_EXE="./tests --gtest_color=yes"
|
||||||
|
|
||||||
# OS X
|
# OS X
|
||||||
- os: osx
|
- os: osx
|
||||||
|
env:
|
||||||
|
- FTXUI_TEST_EXE="./tests --gtest_color=yes"
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
- os: 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")
|
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)
|
set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
FetchContent_Declare(
|
FetchContent_Declare( googletest
|
||||||
googletest
|
GIT_REPOSITORY "https://github.com/google/googletest"
|
||||||
GIT_REPOSITORY "https://github.com/google/googletest"
|
GIT_TAG release-1.10.0
|
||||||
GIT_TAG master
|
|
||||||
)
|
)
|
||||||
|
|
||||||
FetchContent_GetProperties(googletest)
|
FetchContent_GetProperties(googletest)
|
||||||
@ -185,11 +186,12 @@ if (FTXUI_BUILD_TESTS AND ${CMAKE_VERSION} VERSION_GREATER "3.11.4")
|
|||||||
|
|
||||||
target_link_libraries(tests
|
target_link_libraries(tests
|
||||||
PRIVATE component
|
PRIVATE component
|
||||||
PRIVATE gtest gtest_main
|
PRIVATE gtest
|
||||||
|
PRIVATE gmock
|
||||||
|
PRIVATE gtest_main
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(TARGET tests PROPERTY CXX_STANDARD 17)
|
set_property(TARGET tests PROPERTY CXX_STANDARD 17)
|
||||||
add_test(tests tests)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(FTXUI_BUILD_EXAMPLES)
|
if(FTXUI_BUILD_EXAMPLES)
|
||||||
|
Loading…
Reference in New Issue
Block a user