diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-10-27 00:16:42 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-10-27 00:18:01 +0200 |
commit | 451859e976027410b97fda3147c4543ff86a429b (patch) | |
tree | 819916891308a8de0137b11ce55c0a12b8c97250 /CMakeLists.txt | |
parent | 0f45b9bf3b8a1b8df64583159dbce0ed09c587ed (diff) | |
download | tdv-451859e976027410b97fda3147c4543ff86a429b.tar.gz tdv-451859e976027410b97fda3147c4543ff86a429b.tar.xz tdv-451859e976027410b97fda3147c4543ff86a429b.zip |
Fix the test target and unargumented ctest
CMake does know how to be tough on users, but we've won at last.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 46c2cbc..b76df12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,9 +72,11 @@ if (USE_SYSTEM_TERMO) message (FATAL_ERROR "System termo library not found") endif () else () - # We don't want the library to install, even though EXCLUDE_FROM_ALL - # sabotages CTest -- those unbuilt tests need to be excluded in CTest runs + # We don't want the library to install, but EXCLUDE_FROM_ALL ignores tests add_subdirectory (termo EXCLUDE_FROM_ALL) + file (WRITE ${PROJECT_BINARY_DIR}/CTestCustom.cmake + "execute_process (COMMAND ${CMAKE_COMMAND} --build termo)") + # We don't have many good choices; this is a relatively clean approach # (other possibilities: setting a variable in the parent scope, using # a cache variable, writing a special config file with build paths in it |