From 21e2a876ec7392eb3d8d2c4d0f0aee5cd9a298f0 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Sat, 24 Feb 2024 01:47:04 +0100 Subject: build teakra's test_generator.cpp only if building its unit tests is enabled speeds up builds a bit --- src/teakra/src/CMakeLists.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/teakra') 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) -- cgit v1.2.3