1
0
mirror of synced 2024-11-12 02:00:52 +01:00

build: Allow for better stacktraces on Linux

This commit is contained in:
WerWolv 2023-12-08 14:00:32 +01:00
parent 54c5d9debb
commit 0cbaf40747
5 changed files with 23 additions and 21 deletions

View File

@ -445,6 +445,10 @@ macro(setupCompilerFlags target)
set(IMHEX_COMMON_FLAGS "${IMHEX_COMMON_FLAGS} -Wall -Wextra -Wpedantic -Werror")
endif()
if (UNIX)
set(IMHEX_COMMON_FLAGS "${IMHEX_COMMON_FLAGS} -rdynamic")
endif()
set(IMHEX_CXX_FLAGS "-fexceptions -frtti")
# Disable some warnings
@ -466,6 +470,7 @@ macro(setupCompilerFlags target)
endif ()
# Set actual CMake flags
set_target_properties(${target} PROPERTIES COMPILE_FLAGS "${IMHEX_COMMON_FLAGS} ${IMHEX_C_CXX_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_COMMON_FLAGS} ${IMHEX_C_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_COMMON_FLAGS} ${IMHEX_C_CXX_FLAGS} ${IMHEX_CXX_FLAGS}")
set(CMAKE_OBJC_FLAGS "${CMAKE_OBJC_FLAGS} ${IMHEX_COMMON_FLAGS}")

@ -1 +1 @@
Subproject commit 04ba8ba5cdcd1365f85f62b0c2b98257c2582ae4
Subproject commit a0d9b296fde7c1466549df93d78cfd8f00218012

View File

@ -10,6 +10,5 @@ add_dependencies(imhex_all main-forwarder)
set_target_properties(main-forwarder PROPERTIES
OUTPUT_NAME "imhex"
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../..
CXX_VISIBILITY_PRESET hidden
POSITION_INDEPENDENT_CODE ON
)

View File

@ -48,7 +48,6 @@ endif ()
set_target_properties(main PROPERTIES
OUTPUT_NAME ${IMHEX_APPLICATION_NAME}
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../..
CXX_VISIBILITY_PRESET hidden
POSITION_INDEPENDENT_CODE ON)
add_compile_definitions(IMHEX_PROJECT_NAME="${PROJECT_NAME}")

View File

@ -10,6 +10,5 @@ add_dependencies(imhex_all updater)
set_target_properties(updater PROPERTIES
OUTPUT_NAME "imhex-updater"
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../..
CXX_VISIBILITY_PRESET hidden
POSITION_INDEPENDENT_CODE ON
)