summaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-07-25 12:31:49 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit5ec4a4e9bfae4fe550b5e3f23dadca03c1ea2474 (patch)
tree028607c0e2f88d460125a328cde52af4d9cd3e46 /cmake/cmake.d
parent72e3bcf92fe668fd5dd2c4ec323f0d4a9eb51ff1 (diff)
Change compile flag and clearer to read
Use -O0 with DEBUG instead of -0g Change-Id: I100e2188b34f3506d400379808ce875a4817be8d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d')
-rw-r--r--cmake/cmake.d/04-build_options.cmake17
1 files changed, 9 insertions, 8 deletions
diff --git a/cmake/cmake.d/04-build_options.cmake b/cmake/cmake.d/04-build_options.cmake
index d1b25f4..899505f 100644
--- a/cmake/cmake.d/04-build_options.cmake
+++ b/cmake/cmake.d/04-build_options.cmake
@@ -75,18 +75,19 @@ add_compile_options(-fPIC)
# TODO: make more visible readable compile (macro ? split ?)
# Compilation option depending on CMAKE_BUILD_TYPE
##################################################
-add_compile_options($<$<OR:$<CONFIG:DEBUG>,$<CONFIG:PROFILING>,$<CONFIG:CCOV>>:-g>)
-
-add_compile_options($<$<CONFIG:DEBUG>:-ggdb>)
-add_compile_options($<$<CONFIG:CCOV>:--coverage>)
-
-add_compile_options($<$<CONFIG:DEBUG>:-Og>)
+add_compile_options($<$<CONFIG:PROFILING>:-g>)
add_compile_options($<$<CONFIG:PROFILING>:-O0>)
add_compile_options($<$<CONFIG:PROFILING>:-pg>)
-add_compile_options($<$<OR:$<CONFIG:CCOV>,$<CONFIG:PROFILING>>:-O2>)
+add_compile_options($<$<CONFIG:PROFILING>:-Wp,-U_FORTIFY_SOURCE>)
-add_compile_options($<$<OR:$<CONFIG:DEBUG>,$<CONFIG:PROFILING>>:-Wp,-U_FORTIFY_SOURCE>)
+add_compile_options($<$<CONFIG:DEBUG>:-g>)
+add_compile_options($<$<CONFIG:DEBUG>:-O0>)
+add_compile_options($<$<CONFIG:DEBUG>:-ggdb>)
+add_compile_options($<$<CONFIG:DEBUG>:-Wp,-U_FORTIFY_SOURCE>)
+add_compile_options($<$<CONFIG:CCOV>:-g>)
+add_compile_options($<$<CONFIG:CCOV>:-O2>)
+add_compile_options($<$<CONFIG:CCOV>:--coverage>)
# Env variable overload default
if(DEFINED ENV{INSTALL_PREFIX})