tests: Only configure tests when asked for
This prevents the download of googletest for normal builds. Now when we want to compile and run tests we need to specify -DBUILD_TESTS=ON
This commit is contained in:
parent
fce313f3ef
commit
3f9ce4bb99
@ -23,7 +23,7 @@ matrix:
|
||||
env: BUILD_TYPE=Debug
|
||||
|
||||
- compiler: gcc
|
||||
env: BUILD_TYPE=Debug POLYBAR_BUILD_TYPE=tests
|
||||
env: BUILD_TYPE=Debug POLYBAR_BUILD_TYPE=tests BUILD_TESTS=ON
|
||||
before_install:
|
||||
- pip install --user cpp-coveralls
|
||||
script: ${TRAVIS_BUILD_DIR}/common/travis/tests.sh
|
||||
|
@ -28,9 +28,7 @@ add_subdirectory(src bin)
|
||||
|
||||
# We need to enable testing in the root folder so that 'ctest' and 'make test'
|
||||
# can be run in the build directory
|
||||
enable_testing()
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(tests)
|
||||
else()
|
||||
enable_testing()
|
||||
add_subdirectory(tests EXCLUDE_FROM_ALL)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user