0
  1. I’m trying to generate Xcode project file of some libraries with CMake.
  2. I want to generate dSYM file in all build config type.
  3. I set values in all my CMakelists.txt as below: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym")
  4. After CMake generate my xcodeproj file, I find out “Generate Debug Symbols” is set to true in Debug but set to false in Release build type enter image description here
  5. I only find it happened in one library, and other libraries worked perfectly.
  6. Does anyone have a clue?
  7. I found relevant question and tried, but not valid: cmake-with-xcode-target-generate-debug-symbols-setting-ignored-for-release-conf

What I expect is as below image. Actually cmake works good with other library. enter image description here

2
  • 1
    please show a minimal reproducible example Commented Jul 4 at 8:43
  • @AlanBirtles I finally solved it. The reason is the library includes *.c file, and I should add set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g") :(
    – shaunwick
    Commented Jul 4 at 10:11

0

Browse other questions tagged or ask your own question.