1 # Split debug information from an executable into a separate file.
2 # SPLIT_DEBUG_INFORMATION(EXE_TARGET)
5 # - http://cmake.3232098.n2.nabble.com/Save-stripped-debugging-information-td6819195.html
6 # - http://sourceware.org/bugzilla/show_bug.cgi?id=14527
7 # - If debug symbols are stripped before .gnu_debuglink is added,
8 # the section will be truncated to .gnu_deb, and hence won't
9 # be recognized by gdb.
10 # - FIXME: If the above .gnu_debuglink workaround is used, Windows XP
11 # and Windows 7 will claim that the executable isn't a valid Win32
12 # executable. (Wine ignores it and works fine!)
14 MACRO(SET_MSVC_DEBUG_PATH _target)
16 # CMake seems to use weird settings for the PDB file.
17 # (at least version 2.8.12.2; 3.0.0 might be different)
21 CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
25 CMAKE_CXX_COMPILE_OBJECT "${CMAKE_CXX_COMPILE_OBJECT}")
27 # Set the target PDB filename.
28 SET_TARGET_PROPERTIES(${_target}
29 PROPERTIES PDB "${CMAKE_CURRENT_BINARY_DIRECTORY}/${_target}.pdb")
31 ENDMACRO(SET_MSVC_DEBUG_PATH)