summaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d/01-build_options.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/cmake.d/01-build_options.cmake')
-rw-r--r--cmake/cmake.d/01-build_options.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmake/cmake.d/01-build_options.cmake b/cmake/cmake.d/01-build_options.cmake
index b55df59..17f1eab 100644
--- a/cmake/cmake.d/01-build_options.cmake
+++ b/cmake/cmake.d/01-build_options.cmake
@@ -59,20 +59,20 @@ endforeach()
# Compilation option depending on CMAKE_BUILD_TYPE
##################################################
set(PROFILING_COMPILE_OPTIONS -g -O0 -pg -Wp,-U_FORTIFY_SOURCE CACHE STRING "Compilation flags for PROFILING build type.")
-set(DEBUG_COMPILE_OPTIONS -g -ggdb -Wp,-U_FORTIFY_SOURCE CACHE STRING "Compilation flags for DEBUG build type.")
+set(DEBUG_COMPILE_OPTIONS -g -ggdb -D_FORTIFY_SOURCE=2 CACHE STRING "Compilation flags for DEBUG build type.")
set(CCOV_COMPILE_OPTIONS -g -O2 --coverage CACHE STRING "Compilation flags for CCOV build type.")
-set(RELEASE_COMPILE_OPTIONS -g -O2 CACHE STRING "Compilation flags for RELEASE build type.")
+set(RELEASE_COMPILE_OPTIONS -g -O2 -D_FORTIFY_SOURCE=2 CACHE STRING "Compilation flags for RELEASE build type.")
foreach(option ${PROFILING_COMPILE_OPTIONS})
add_compile_options($<$<CONFIG:PROFILING>:${option}>)
endforeach()
foreach(option ${DEBUG_COMPILE_OPTIONS})
- add_compile_options($<$<CONFIG:PROFILING>:${option}>)
+ add_compile_options($<$<CONFIG:DEBUG>:${option}>)
endforeach()
foreach(option ${CCOV_COMPILE_OPTIONS})
- add_compile_options($<$<CONFIG:PROFILING>:${option}>)
+ add_compile_options($<$<CONFIG:CCOV>:${option}>)
endforeach()
foreach(option ${RELEASE_COMPILE_OPTIONS})
- add_compile_options($<$<CONFIG:PROFILING>:${option}>)
+ add_compile_options($<$<CONFIG:RELEASE>:${option}>)
endforeach()
# Loop on required package and add options