mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Merge pull request #10851 from akallabeth/debug-rel-path
[cmake] prefer relative paths for debug symbols
This commit is contained in:
@@ -64,10 +64,14 @@ endif()
|
||||
|
||||
CheckCXXFlag(-fno-omit-frame-pointer)
|
||||
|
||||
CheckCXXFlag(-fmacro-prefix-map="${CMAKE_SOURCE_DIR}"="./")
|
||||
CheckCXXFlag(-fmacro-prefix-map="${CMAKE_BINARY_DIR}"="./build/")
|
||||
CheckCXXFlag(-ffile-prefix-map="${CMAKE_SOURCE_DIR}"="./")
|
||||
CheckCXXFlag(-ffile-prefix-map="${CMAKE_BINARY_DIR}"="./build")
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-fdebug-prefix-map=${CMAKE_SOURCE_DIR}=.>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=.>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-fdebug-prefix-map=${CMAKE_BINARY_DIR}=./build>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-fmacro-prefix-map=${CMAKE_BINARY_DIR}=./build>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-ffile-prefix-map=${CMAKE_BINARY_DIR}=./build>)
|
||||
endif()
|
||||
|
||||
# https://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c
|
||||
if (WIN32)
|
||||
|
||||
@@ -64,10 +64,14 @@ endif()
|
||||
|
||||
CheckCFlag(-fno-omit-frame-pointer)
|
||||
|
||||
CheckCFlag(-fmacro-prefix-map="${CMAKE_SOURCE_DIR}"="./")
|
||||
CheckCFlag(-fmacro-prefix-map="${CMAKE_BINARY_DIR}"="./build/")
|
||||
CheckCFlag(-ffile-prefix-map="${CMAKE_SOURCE_DIR}"="./")
|
||||
CheckCFlag(-ffile-prefix-map="${CMAKE_BINARY_DIR}"="./build")
|
||||
if (CMAKE_C_COMPILER_ID MATCHES "Clang" OR CMAKE_C_COMPILER_ID MATCHES "GNU")
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-fdebug-prefix-map=${CMAKE_SOURCE_DIR}=.>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=.>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-ffile-prefix-map=${CMAKE_SOURCE_DIR}=.>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-fdebug-prefix-map=${CMAKE_BINARY_DIR}=./build>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-fmacro-prefix-map=${CMAKE_BINARY_DIR}=./build>)
|
||||
add_compile_options($<$<NOT:$<CONFIG:Debug>>:-ffile-prefix-map=${CMAKE_BINARY_DIR}=./build>)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "default CFLAGS")
|
||||
message("Using CFLAGS ${CMAKE_C_FLAGS}")
|
||||
|
||||
Reference in New Issue
Block a user