From 319a0ca979ec2806e0d11c11018ac3cf8aae9715 Mon Sep 17 00:00:00 2001 From: Marco Antonio Jaguaribe Costa Date: Thu, 26 Jan 2023 19:45:46 -0300 Subject: [PATCH] Extract Debug definitions to some syntactic sugar this will be used in more targets in the future, this will avoid repetition --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dec52d6..d0cc87ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,7 @@ ValidateOptions("${ValidLanguages}" "Languages" "${Languages}" "LangTargets") set(ValidApplications JA2 JA2MAPEDITOR JA2UB JA2UBMAPEDITOR) ValidateOptions("${ValidApplications}" "Applications" "${Applications}" "ApplicationTargets") +set(debugFlags $,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY,>) # Due to widespread preprocessor definition abuse in the codebase, practically # every library-language-executable combination is its own compilation target @@ -144,7 +145,7 @@ foreach(lang IN LISTS LangTargets) $ $ $ - $,JA2BETAVERSION;JA2TESTVERSION;DEBUG_ATTACKBUSY,> + ${debugFlags} ${lang} ) target_link_libraries(${targPrefix} PUBLIC ${tgt})