Added populate binding config files
[apps/app-templates.git] / cmake / cmake.d / 01-build_options.cmake
index 246d650..84649fc 100644 (file)
@@ -39,7 +39,7 @@ set(CMP0048 1)
 # Default compilation options
 ############################################################################
 link_libraries(-Wl,--as-needed -Wl,--gc-sections)
-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(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")
 foreach(option ${COMPILE_OPTIONS})
        add_compile_options($<$<CONFIG:PROFILING>:${option}>)
 endforeach()
@@ -58,10 +58,10 @@ 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(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(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.")
 foreach(option ${PROFILING_COMPILE_OPTIONS})
        add_compile_options($<$<CONFIG:PROFILING>:${option}>)
 endforeach()
@@ -76,12 +76,15 @@ foreach(option ${RELEASE_COMPILE_OPTIONS})
 endforeach()
 
 # Env variable overload default
-if(DEFINED 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()
-set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX} CACHE STRING "Installation Prefix")
+# Disabled by default now. Tell me if you need really it
+# but you should not have needs for that since you can
+# set CMAKE_INSTALL_PREFIX in your config.cmake.
+#if(DEFINED 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()
+#set(CMAKE_INSTALL_PREFIX ${INSTALL_PREFIX} CACHE PATH "Installation Prefix")
 
 # Loop on required package and add options
 foreach (PKG_CONFIG ${PKG_REQUIRED_LIST})