Fix debugging and profiling on macOS
parent
8105699d5e
commit
2a56ba661e
|
@ -72,11 +72,13 @@ endif()
|
|||
# common compiler flags
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
set(FILE_PREFIX_MAP "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
|
||||
check_cxx_compiler_flag("${FILE_PREFIX_MAP}" HAS_FILE_PREFIX_MAP)
|
||||
if(HAS_FILE_PREFIX_MAP)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FILE_PREFIX_MAP}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FILE_PREFIX_MAP}")
|
||||
if (NOT APPLE)
|
||||
set(FILE_PREFIX_MAP "-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.")
|
||||
check_cxx_compiler_flag("${FILE_PREFIX_MAP}" HAS_FILE_PREFIX_MAP)
|
||||
if(HAS_FILE_PREFIX_MAP)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FILE_PREFIX_MAP}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FILE_PREFIX_MAP}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
|
|
Loading…
Reference in New Issue