Created
October 26, 2021 08:06
-
-
Save mpusz/d7a70ded552176f340a98aaa9e92f03a to your computer and use it in GitHub Desktop.
CMAKE_USER_MAKE_RULES_OVERRIDE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(...) | |
set(CMAKE_USER_MAKE_RULES_OVERRIDE "cmake/init_flags.cmake") | |
project(...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Debug level 3 includes extra information, such as all the macro definitions present in the program | |
foreach(lang IN ITEMS C CXX) | |
foreach(config IN ITEMS DEBUG RELWITHDEBINFO) | |
if(DEFINED CMAKE_${lang}_FLAGS_${config}_INIT AND NOT CMAKE_${lang}_FLAGS_${config}_INIT MATCHES "-g3") | |
message(STATUS "Changing CMAKE_${lang}_FLAGS_${config}_INIT") | |
message(STATUS " From: ${CMAKE_${lang}_FLAGS_${config}_INIT}") | |
string(REPLACE "-g" "-g3" CMAKE_${lang}_FLAGS_${config}_INIT "${CMAKE_${lang}_FLAGS_${config}_INIT}") | |
message(STATUS " To: ${CMAKE_${lang}_FLAGS_${config}_INIT}") | |
message(STATUS "Changing CMAKE_${lang}_FLAGS_${config}_INIT - done") | |
endif() | |
endforeach() | |
endforeach() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment