aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-07-05 16:56:00 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-07-05 16:56:00 +0200
commit0fc19b3bd78758bdcbc2c5e3a2188ce3173406c9 (patch)
tree89022126a8763666d7f43d25ef24be03f835bdca /cmake
parentb1bb356be470cfc10a0d9457166ad21af0bd3f19 (diff)
Changes build flags to be more accurate
Change-Id: I1139845c4d103935c75dbd24ab6a4c38d121bdea Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/cmake.d/04-build_options.cmake15
1 files changed, 7 insertions, 8 deletions
diff --git a/cmake/cmake.d/04-build_options.cmake b/cmake/cmake.d/04-build_options.cmake
index 1aa046a..aacad64 100644
--- a/cmake/cmake.d/04-build_options.cmake
+++ b/cmake/cmake.d/04-build_options.cmake
@@ -71,21 +71,20 @@ add_compile_options(-Werror=maybe-uninitialized)
add_compile_options(-Werror=implicit-function-declaration)
add_compile_options(-ffunction-sections -fdata-sections)
add_compile_options(-fPIC)
-add_compile_options(-g)
-set(CMAKE_C_FLAGS_PROFILING "-g -O2 -pg -Wp,-U_FORTIFY_SOURCE" CACHE STRING "Flags for profiling")
-set(CMAKE_C_FLAGS_DEBUG "-g -O2 -ggdb -Wp,-U_FORTIFY_SOURCE" CACHE STRING "Flags for debugging")
+set(CMAKE_C_FLAGS_PROFILING "-g -O0 -pg -Wp,-U_FORTIFY_SOURCE" CACHE STRING "Flags for profiling")
+set(CMAKE_C_FLAGS_DEBUG "-g -Og -ggdb -Wp,-U_FORTIFY_SOURCE" CACHE STRING "Flags for debugging")
set(CMAKE_C_FLAGS_RELEASE "-O2" CACHE STRING "Flags for releasing")
set(CMAKE_C_FLAGS_CCOV "-g -O2 --coverage" CACHE STRING "Flags for coverage test")
-set(CMAKE_CXX_FLAGS_PROFILING "-g -O0 -pg -Wp,-U_FORTIFY_SOURCE")
-set(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -ggdb -Wp,-U_FORTIFY_SOURCE")
-set(CMAKE_CXX_FLAGS_RELEASE "-g -O2")
-set(CMAKE_CXX_FLAGS_CCOV "-g -O2 --coverage")
+set(CMAKE_CXX_FLAGS_PROFILING "-g -O0 -pg -Wp,-U_FORTIFY_SOURCE" CACHE STRING "Flags for profiling")
+set(CMAKE_CXX_FLAGS_DEBUG "-g -Og -ggdb -Wp,-U_FORTIFY_SOURCE" CACHE STRING "Flags for debugging")
+set(CMAKE_CXX_FLAGS_RELEASE "-O2" CACHE STRING "Flags for releasing")
+set(CMAKE_CXX_FLAGS_CCOV "-g -O2 --coverage" CACHE STRING "Flags for coverage test")
# Env variable overload default
if(DEFINED ENV{INSTALL_PREFIX})
- set (INSTALL_PREFIX $ENV{INSTALL_PREFIX})
+ set(INSTALL_PREFIX $ENV{INSTALL_PREFIX} CACHE PATH "The path where to install")
else()
set(INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/Install" CACHE PATH "The path where to install")
endif()