Clearer coverage compilation options configuration
[apps/app-templates.git] / cmake / cmake.d / 01-build_options.cmake
index 17f1eab..1f7bd9c 100644 (file)
@@ -40,9 +40,6 @@ set(CMP0048 1)
 ############################################################################
 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")
-foreach(option ${COMPILE_OPTIONS})
-       add_compile_options($<$<CONFIG:PROFILING>:${option}>)
-endforeach()
 
 # Compilation OPTIONS depending on language
 #########################################
@@ -60,7 +57,7 @@ endforeach()
 ##################################################
 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 -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(COVERAGE_COMPILE_OPTIONS -g -O2 --coverage CACHE STRING "Compilation flags for COVERAGE 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}>)
@@ -68,8 +65,8 @@ endforeach()
 foreach(option ${DEBUG_COMPILE_OPTIONS})
        add_compile_options($<$<CONFIG:DEBUG>:${option}>)
 endforeach()
-foreach(option ${CCOV_COMPILE_OPTIONS})
-       add_compile_options($<$<CONFIG:CCOV>:${option}>)
+foreach(option ${COVERAGE_COMPILE_OPTIONS})
+       add_compile_options($<$<CONFIG:COVERAGE>:${option}>)
 endforeach()
 foreach(option ${RELEASE_COMPILE_OPTIONS})
        add_compile_options($<$<CONFIG:RELEASE>:${option}>)