From 1e44655a66728da3a02e10b1d09de881b1481ba6 Mon Sep 17 00:00:00 2001 From: kj16609 Date: Mon, 15 Dec 2025 21:26:59 -0500 Subject: [PATCH] fixes --- modules/compiler/gcc.cmake | 2 +- modules/helpers.cmake | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/modules/compiler/gcc.cmake b/modules/compiler/gcc.cmake index 2ea06bc..7f77988 100644 --- a/modules/compiler/gcc.cmake +++ b/modules/compiler/gcc.cmake @@ -124,7 +124,7 @@ set(FGL_STATIC_ANALYSIS 0) endif () - if (FGL_STATIC_ANALYSIS EQUAL 1) + if (DEFINED FGL_STATIC_ANALYSIS AND FGL_STATIC_ANALYSIS EQUAL 1) list(APPEND FGL_CONFIG "-fanalyzer") # list(APPEND FGL_CONFIG "-Wanalyzer-too-complex") # Breaks more often then it is helpful diff --git a/modules/helpers.cmake b/modules/helpers.cmake index 4407072..09ff211 100644 --- a/modules/helpers.cmake +++ b/modules/helpers.cmake @@ -33,13 +33,15 @@ function(ConfigureFGLTarget NAME SRC_DIR INCLUDE_DIR) endfunction() function(SplitDebugSymbols NAME) - if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") - add_custom_command(TARGET ${NAME} POST_BUILD - COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $ $.debug - COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $ - COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$.debug $ - COMMENT "Stripping symbols and creating ${NAME}.debug" - ) + if (DEFINED FGL_STRIP_DEBUG AND FGL_STRIP_DEBUG) + if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + add_custom_command(TARGET ${NAME} POST_BUILD + COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $ $.debug + COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $ + COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$.debug $ + COMMENT "Stripping symbols and creating ${NAME}.debug" + ) + endif () endif () endfunction()