diff options
author | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2024-02-24 01:47:04 +0100 |
---|---|---|
committer | Nadia Holmquist Pedersen <nadia@nhp.sh> | 2024-02-24 01:47:04 +0100 |
commit | 21e2a876ec7392eb3d8d2c4d0f0aee5cd9a298f0 (patch) | |
tree | 7b818b88ed813ab60d9f2d56cd58208bc7a1867d | |
parent | 9430502b16c0b4f1f82cd31d79beff15edd00762 (diff) |
build teakra's test_generator.cpp only if building its unit tests is
enabled
speeds up builds a bit
-rw-r--r-- | src/teakra/src/CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/teakra/src/CMakeLists.txt b/src/teakra/src/CMakeLists.txt index b96c500..3068337 100644 --- a/src/teakra/src/CMakeLists.txt +++ b/src/teakra/src/CMakeLists.txt @@ -32,11 +32,16 @@ add_library(teakra register.h shared_memory.h teakra.cpp - test.h - test_generator.cpp - test_generator.h ) +if (TEAKRA_BUILD_UNIT_TESTS) + target_sources(teakra PUBLIC + test.h + test_generator.cpp + test_generator.h + ) +endif() + create_target_directory_groups(teakra) target_link_libraries(teakra PRIVATE Threads::Threads) |