From dc83f12146e858feaca5ce0bef599ca81ac300d4 Mon Sep 17 00:00:00 2001 From: Zhihui Xia Date: Thu, 5 Oct 2023 09:20:53 -0700 Subject: [PATCH] update cmake codegen --- identity/CMakeLists.txt | 4 +--- jobs/CMakeLists.txt | 4 +--- shadow/CMakeLists.txt | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/identity/CMakeLists.txt b/identity/CMakeLists.txt index f58757a02..b8997539a 100644 --- a/identity/CMakeLists.txt +++ b/identity/CMakeLists.txt @@ -59,9 +59,7 @@ else () target_compile_options(IotIdentity-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror) endif () -if (CMAKE_BUILD_TYPE STREQUAL "" OR CMAKE_BUILD_TYPE MATCHES Debug) - target_compile_definitions(IotIdentity-cpp PRIVATE "-DDEBUG_BUILD") -endif () +target_compile_definitions(IotIdentity-cpp $<$:DEBUG_BUILD>) if (BUILD_SHARED_LIBS) target_compile_definitions(IotIdentity-cpp PUBLIC "-DAWS_IOTIDENTITY_USE_IMPORT_EXPORT") diff --git a/jobs/CMakeLists.txt b/jobs/CMakeLists.txt index 4059f09fa..d0371b69f 100644 --- a/jobs/CMakeLists.txt +++ b/jobs/CMakeLists.txt @@ -59,9 +59,7 @@ else () target_compile_options(IotJobs-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror) endif () -if (CMAKE_BUILD_TYPE STREQUAL "" OR CMAKE_BUILD_TYPE MATCHES Debug) - target_compile_definitions(IotJobs-cpp PRIVATE "-DDEBUG_BUILD") -endif () +target_compile_definitions(IotJobs-cpp $<$:DEBUG_BUILD>) if (BUILD_SHARED_LIBS) target_compile_definitions(IotJobs-cpp PUBLIC "-DAWS_IOTJOBS_USE_IMPORT_EXPORT") diff --git a/shadow/CMakeLists.txt b/shadow/CMakeLists.txt index 96797b391..1a3345762 100644 --- a/shadow/CMakeLists.txt +++ b/shadow/CMakeLists.txt @@ -59,9 +59,7 @@ else () target_compile_options(IotShadow-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror) endif () -if (CMAKE_BUILD_TYPE STREQUAL "" OR CMAKE_BUILD_TYPE MATCHES Debug) - target_compile_definitions(IotShadow-cpp PRIVATE "-DDEBUG_BUILD") -endif () +target_compile_definitions(IotShadow-cpp $<$:DEBUG_BUILD>) if (BUILD_SHARED_LIBS) target_compile_definitions(IotShadow-cpp PUBLIC "-DAWS_IOTSHADOW_USE_IMPORT_EXPORT")