diff options
author | redfish <redfish@galactica.pw> | 2016-08-29 12:17:02 -0400 |
---|---|---|
committer | redfish <redfish@galactica.pw> | 2016-08-30 22:56:14 -0400 |
commit | 4a9e94944c47c38c53967452efd83a7e4c2d4804 (patch) | |
tree | 24c2f79810a3c7990f5434c9f537c16490ba406d | |
parent | cmake: tests: gtest target is not always defined #983 (diff) | |
download | monero-4a9e94944c47c38c53967452efd83a7e4c2d4804.tar.xz |
tests: cmake: use a list for enabled tests
Avoid replicating common logic.
-rw-r--r-- | tests/CMakeLists.txt | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a3743d84c..9f546590c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -97,11 +97,17 @@ add_test( NAME hash-target COMMAND hash-target-tests) -# Skip the core_tests if we are running in Travis-CI because they will take too long -if (DEFINED ENV{TRAVIS}) - add_custom_target(tests DEPENDS difficulty hash performance_tests core_proxy unit_tests) -else () - add_custom_target(tests DEPENDS coretests difficulty hash performance_tests core_proxy unit_tests) -endif () +set(enabled_tests + difficulty + hash + performance_tests + core_proxy + unit_tests) + +# Skip the core_tests in Travis-CI because they will take too long +if (NOT DEFINED ENV{TRAVIS}) + list(APPEND enabled_tests coretests) +endif() +add_custom_target(tests DEPENDS enabled_tests) set_property(TARGET tests PROPERTY FOLDER "${folder}") |