Home > Mobile >  cmake debugging -g -Og -Og settting CMAKE_C(XX)_FLAGS_DEBUGS
cmake debugging -g -Og -Og settting CMAKE_C(XX)_FLAGS_DEBUGS

Time:08-09

my CMAKE_C_FLAGS_DEBUGS and CMAKE_CXX_FLAGS_DEBUG flags in the end result in -g -Og -Og, when removing one -Og I have to build again, while i thought that only the last -Og would be taken. This makes me think that there is a difference in behaviour between the two.

Can someone explain this behaviour. It is caused by the cmake-gui which has its own settings, which i did not expect.

CodePudding user response:

CMake doesn't look at the specific flags you're passing, since that would require understanding command-line options for all the compilers it supports. Because you changed the flags, even in a manner that's logically equivalent from a gcc perspective, CMake considers everything built with the old flags out of date.

  • Related