Skip to content

Commit

Permalink
CMake : set -fno-exceptions in Debug/Coverage mode & -fpic for main lib
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslepoix committed Nov 27, 2024
1 parent cc90319 commit bfd7848
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ target_sources( openemsh
"${CMAKE_CURRENT_SOURCE_DIR}/app/openemsh.cpp"
)

set_target_properties( openemsh
PROPERTIES
POSITION_INDEPENDENT_CODE ON
)

target_compile_definitions( openemsh
PRIVATE
$<$<CONFIG:Debug>:DEBUG>
Expand All @@ -48,7 +53,7 @@ target_compile_options( openemsh
$<$<OR:$<CONFIG:Coverage>,$<CONFIG:Debug>>:-Wall>
$<$<OR:$<CONFIG:Coverage>,$<CONFIG:Debug>>:-Wextra>
# $<$<OR:$<CONFIG:Coverage>,$<CONFIG:Debug>>:-Weffc++>
$<$<OR:$<CONFIG:Coverage>,$<CONFIG:Debug>>:-fexceptions>
$<$<OR:$<CONFIG:Coverage>,$<CONFIG:Debug>>:-fno-exceptions>
)

target_include_directories( openemsh
Expand Down

0 comments on commit bfd7848

Please sign in to comment.