summaryrefslogtreecommitdiffstats
path: root/cmake/cmake.d/01-build_options.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-08-13 10:27:31 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-08-13 10:27:31 +0200
commite841a7787b2315f068f50d77b04196b7d7ccc17d (patch)
tree454c328cfe41de64dc2a0f25efc1877138e21200 /cmake/cmake.d/01-build_options.cmake
parent994ebc1ca22fad1f0f302da02171d935eefa4a8a (diff)
Adding a TEST build typeflounder_5.99.3flounder/5.99.35.99.3
Change-Id: Id2a2ede0f01bfc48757904f43b01e52a1c8b110d Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/cmake.d/01-build_options.cmake')
-rw-r--r--cmake/cmake.d/01-build_options.cmake17
1 files changed, 5 insertions, 12 deletions
diff --git a/cmake/cmake.d/01-build_options.cmake b/cmake/cmake.d/01-build_options.cmake
index 502b6bd..72a3161 100644
--- a/cmake/cmake.d/01-build_options.cmake
+++ b/cmake/cmake.d/01-build_options.cmake
@@ -87,25 +87,18 @@ 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 CACHE STRING "Compilation flags for DEBUG build type.")
+set(TEST_COMPILE_OPTIONS -g -ggdb CACHE STRING "Compilation flags for TEST build type.")
set(COVERAGE_COMPILE_OPTIONS -g --coverage CACHE STRING "Compilation flags for COVERAGE build type.")
-set(RELEASE_COMPILE_OPTIONS -O2
- -pipe
- -D_FORTIFY_SOURCE=2
- -fstack-protector-strong
- -Wformat -Wformat-security
- -Werror=format-security
- -feliminate-unused-debug-types
- -Wl,-O1
- -Wl,--hash-style=gnu
- -Wl,--as-needed
- -fstack-protector-strong
- -Wl,-z,relro,-z,now CACHE STRING "Compilation flags for RELEASE build type. This is a copy of default Yocto build compile flags.")
+set(RELEASE_COMPILE_OPTIONS -O2 -D_FORTIFY_SOURCE=2 CACHE STRING "Compilation flags for RELEASE build type.")
foreach(option ${PROFILING_COMPILE_OPTIONS})
add_compile_options($<$<CONFIG:PROFILING>:${option}>)
endforeach()
foreach(option ${DEBUG_COMPILE_OPTIONS})
add_compile_options($<$<CONFIG:DEBUG>:${option}>)
endforeach()
+foreach(option ${TEST_COMPILE_OPTIONS})
+ add_compile_options($<$<CONFIG:TEST>:${option}>)
+endforeach()
foreach(option ${COVERAGE_COMPILE_OPTIONS})
add_compile_options($<$<CONFIG:COVERAGE>:${option}>)
endforeach()