WeZZard / ios-cmake

Automatically exported from code.google.com/p/ios-cmake
0 stars 0 forks source link

Generate Debug Symbols not set to Yes for Debug target. #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run cmake using iOS toolchain
2. Open XCode Project
3. Set a breakpoint
4. Run the project

What is the expected output? What do you see instead?
The breakpoint should have been hit.  It was not hit because Generate Debug 
Symbols is not set to "Yes" by default

What version of the product are you using? On what operating system?
Latest on OSX with Xcode 4.4.1

Original issue reported on code.google.com by kann...@gmail.com on 18 Sep 2012 at 12:09

GoogleCodeExporter commented 8 years ago

Original comment by wizzr...@gmail.com on 18 Sep 2012 at 2:16

GoogleCodeExporter commented 8 years ago
Currently the configuration (Debug/Release/etc) dependent settings of Xcode 
properties does not work as expected.

This is not going to be really fixable unless this cmake issue is resolved: 
http://public.kitware.com/Bug/view.php?id=12532

Original comment by wizzr...@gmail.com on 18 Sep 2012 at 4:55

GoogleCodeExporter commented 8 years ago
I just tested the same project using the cmake OSX Xcode generator, and it sets 
the Debug and Release properties correctly for Generate Debug Symbols.

Is there any way to at least turn on Generate Debug Symbols by default?

Original comment by kann...@gmail.com on 18 Sep 2012 at 6:16

GoogleCodeExporter commented 8 years ago
To turn on Generate Debug Symbols for all of your configurations simply add 
this line to your CMakeLists.txt right after your target:

set_xcode_property(mytarget GCC_GENERATE_DEBUGGING_SYMBOLS YES)

Original comment by wizzr...@gmail.com on 18 Sep 2012 at 6:26

GoogleCodeExporter commented 8 years ago
With the release of CMake 2.8.12, which fixes defect 12532, is this something 
you could sort out now?

Original comment by shefmich...@gmail.com on 14 Oct 2013 at 2:04

GoogleCodeExporter commented 8 years ago
Excellent, I'll get on it. Now it 'should' be fixable

Original comment by wizzr...@gmail.com on 15 Oct 2013 at 2:24

GoogleCodeExporter commented 8 years ago

Original comment by wizzr...@gmail.com on 15 Oct 2013 at 2:25

GoogleCodeExporter commented 8 years ago
Removing the following lines from iOS.cmake solves the issue for me:

  # Force the compilers to gcc for iOS
  include (CMakeForceCompiler)
  CMAKE_FORCE_C_COMPILER (/usr/bin/clang Apple)
  CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Apple)
  set(CMAKE_AR ar CACHE FILEPATH "" FORCE)

Are they really needed?

Autodetection of the compiler seems to work fine for me...

Original comment by jan.rue...@dacuda.com on 4 Aug 2014 at 1:57

GoogleCodeExporter commented 8 years ago
Hmm... actually removing the lines produes the messages:

  -- Detecting C compiler ABI info - failed
  -- Detecting CXX compiler ABI info - failed

However, changed "Apple" to "Clang" (what also happens when removing the lines) 
seems to solve the issue in the correct way:

  # Force the compilers to clang for iOS
  include (CMakeForceCompiler)
  CMAKE_FORCE_C_COMPILER (/usr/bin/clang Clang)
  CMAKE_FORCE_CXX_COMPILER (/usr/bin/clang++ Clang)
  set(CMAKE_AR ar CACHE FILEPATH "" FORCE)

Original comment by jan.rue...@dacuda.com on 5 Aug 2014 at 8:07