aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/config.cmake.sample
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-10 11:51:35 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-08-10 11:51:35 +0200
commit5b4dfe23ef1141d8f7595a157ca7a8ee5ad8ad07 (patch)
tree7c0eae948f7ffc36763666e6867d37412370144f /cmake/config.cmake.sample
parent77813a98067d7a90214e96f3fc4f1ee93d8c45c8 (diff)
Change compilation flags setup.
Use CMAKE cache variables other than defaults ones to don't be in conflict and iterates over them with add_compile_options command Change-Id: I5e62ab1a340aca15eafeb687998c06e13a571357 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/config.cmake.sample')
-rw-r--r--cmake/config.cmake.sample13
1 files changed, 11 insertions, 2 deletions
diff --git a/cmake/config.cmake.sample b/cmake/config.cmake.sample
index 23f1e80..f5ac42a 100644
--- a/cmake/config.cmake.sample
+++ b/cmake/config.cmake.sample
@@ -80,8 +80,17 @@ set (PKG_REQUIRED_LIST
# Compilation options definition
# Use CMake generator expressions to specify only for a specific language
-# -----------------------------------------------------------------------
-#add_compile_options()
+# Values are prefilled with default options that is currently used.
+# Either separate options with ";", or each options must be quoted separately
+# DO NOT PUT ALL OPTION QUOTED AT ONCE , COMPILATION COULD FAILED !
+# ----------------------------------------------------------------------------
+#set(COMPILE_OPTIONS "-Wall" "-Wextra" "-Wconversion" "-Wno-unused-parameter" "-Wno-sign-compare" "-Wno-sign-conversion" "-Werror=maybe-uninitialized" "-Werror=implicit-function-declaration" "-ffunction-sections" "-fdata-sections" "-fPIC" CACHE STRING "Compilation flags")
+#set(C_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C language.")
+#set(CXX_COMPILE_OPTIONS "" CACHE STRING "Compilation flags for C++ language.")
+#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(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.")
# Print a helper message when every thing is finished
# ----------------------------------------------------