Author: akhaldi
Date: Tue Jul 17 14:08:18 2012
New Revision: 56908
URL:
http://svn.reactos.org/svn/reactos?rev=56908&view=rev
Log:
[CMAKE]
* Make use of the TARGET_PDB variable to consistently group the separate debug files into
a symbols folder.
Modified:
trunk/reactos/cmake/gcc.cmake
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=56908&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Tue Jul 17 14:08:18 2012
@@ -115,26 +115,33 @@
if(SEPARATE_DBG)
# PDB style debug puts all dwarf debug info in a separate dbg file
+ message(STATUS "Building separate debug symbols")
+ file(MAKE_DIRECTORY ${REACTOS_BINARY_DIR}/symbols)
+ if(CMAKE_GENERATOR MATCHES "Ninja")
+ set(SYMBOL_FILE <TARGET_PDB>)
+ else()
+ set(SYMBOL_FILE <TARGET>.gdb)
+ endif()
set(OBJCOPY ${CMAKE_OBJCOPY})
set(CMAKE_C_LINK_EXECUTABLE
"<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS>
<OBJECTS> -o <TARGET> <LINK_LIBRARIES>"
- "${OBJCOPY} --only-keep-debug <TARGET> <TARGET>.dbg"
+ "${OBJCOPY} --only-keep-debug <TARGET>
${REACTOS_BINARY_DIR}/symbols/${SYMBOL_FILE}"
"${OBJCOPY} --strip-debug <TARGET>")
set(CMAKE_CXX_LINK_EXECUTABLE
"<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS>
<OBJECTS> -o <TARGET> <LINK_LIBRARIES>"
- "${OBJCOPY} --only-keep-debug <TARGET> <TARGET>.dbg"
+ "${OBJCOPY} --only-keep-debug <TARGET>
${REACTOS_BINARY_DIR}/symbols/${SYMBOL_FILE}"
"${OBJCOPY} --strip-debug <TARGET>")
set(CMAKE_C_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS>
<LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET>
<OBJECTS> <LINK_LIBRARIES>"
- "${OBJCOPY} --only-keep-debug <TARGET> <TARGET>.dbg"
+ "${OBJCOPY} --only-keep-debug <TARGET>
${REACTOS_BINARY_DIR}/symbols/${SYMBOL_FILE}"
"${OBJCOPY} --strip-debug <TARGET>")
set(CMAKE_CXX_CREATE_SHARED_LIBRARY
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS>
<LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET>
<OBJECTS> <LINK_LIBRARIES>"
- "${OBJCOPY} --only-keep-debug <TARGET> <TARGET>.dbg"
+ "${OBJCOPY} --only-keep-debug <TARGET>
${REACTOS_BINARY_DIR}/symbols/${SYMBOL_FILE}"
"${OBJCOPY} --strip-debug <TARGET>")
set(CMAKE_RC_CREATE_SHARED_LIBRARY
"<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS>
<LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET>
<OBJECTS> <LINK_LIBRARIES>"
- "${OBJCOPY} --only-keep-debug <TARGET> <TARGET>.dbg"
+ "${OBJCOPY} --only-keep-debug <TARGET>
${REACTOS_BINARY_DIR}/symbols/${SYMBOL_FILE}"
"${OBJCOPY} --strip-debug <TARGET>")
else()
# Normal rsym build