From d4bb9397ee24f766be36350b7179e7e7c3df3e21 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 11 Oct 2021 16:32:19 +0200 Subject: [PATCH] better handling for configure files --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4af52a5b..e0a0bfb0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,8 +92,14 @@ target_include_directories(${LIB_FSFW_NAME} PRIVATE target_include_directories(${LIB_FSFW_NAME} INTERFACE ${CMAKE_CURRENT_BINARY_DIR} ) -configure_file(src/fsfw/FSFW.h.in fsfw/FSFW.h) -configure_file(src/fsfw/FSFWVersion.h.in fsfw/FSFWVersion.h) + +if(FSFW_BUILD_UNITTESTS) + configure_file(src/fsfw/FSFW.h.in fsfw/FSFW.h) + configure_file(src/fsfw/FSFWVersion.h.in fsfw/FSFWVersion.h) +else() + configure_file(src/fsfw/FSFW.h.in FSFW.h) + configure_file(src/fsfw/FSFWVersion.h.in FSFWVersion.h) +endif() if(NOT CMAKE_CXX_STANDARD) set(CMAKE_CXX_STANDARD 11)