mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
[CMAKE]
* Make use of the TARGET_PDB variable to consistently group the separate debug files into a symbols folder. svn path=/trunk/; revision=56908
This commit is contained in:
parent
4c86cb1642
commit
9622dedd9f
1 changed files with 12 additions and 5 deletions
|
@ -115,26 +115,33 @@ endif()
|
|||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue