X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=cmake%2Fcmake.d%2F01-build_options.cmake;h=abd673466af952a9d60c4f35315dfbc643262339;hb=refs%2Ftags%2Flamprey%2F12.1.4;hp=3be92ba11c2f7aa892fbe7a17198b7645dc3391a;hpb=70cf8fdb919aae05088346804436f6df8ce7019d;p=apps%2Fapp-templates.git diff --git a/cmake/cmake.d/01-build_options.cmake b/cmake/cmake.d/01-build_options.cmake index 3be92ba..abd6734 100644 --- a/cmake/cmake.d/01-build_options.cmake +++ b/cmake/cmake.d/01-build_options.cmake @@ -36,9 +36,12 @@ if(NOT CMAKE_BUILD_TYPE) if(BUILD_TYPE) set(CMAKE_BUILD_TYPE ${BUILD_TYPE} CACHE STRING "the type of build" FORCE) else() - set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "the type of build" FORCE) + set(CMAKE_BUILD_TYPE RELEASE CACHE STRING "the type of build" FORCE) endif() endif() +if(NOT DEFINED BUILD_TEST_WGT) + set(BUILD_TEST_WGT FALSE) +endif() set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMP0048 1) @@ -86,8 +89,8 @@ 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 -Og -D_FORTIFY_SOURCE=2 CACHE STRING "Compilation flags for DEBUG build type.") -set(COVERAGE_COMPILE_OPTIONS -g --coverage CACHE STRING "Compilation flags for COVERAGE build type.") +set(DEBUG_COMPILE_OPTIONS -g -ggdb CACHE STRING "Compilation flags for DEBUG build type.") +set(COVERAGE_COMPILE_OPTIONS -g -O0 --coverage CACHE STRING "Compilation flags for COVERAGE build type.") 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($<$:${option}>) @@ -121,9 +124,9 @@ IF(HAVE_LIBEFENCE) list (APPEND link_libraries ${libefence_LIBRARIES}) ENDIF(HAVE_LIBEFENCE) ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG AND USE_EFENCE) -IF(CMAKE_BUILD_TYPE MATCHES COVERAGE) +IF(${CMAKE_BUILD_TYPE} MATCHES COVERAGE) list (APPEND link_libraries -coverage) -ENDIF(CMAKE_BUILD_TYPE MATCHES COVERAGE) +ENDIF(${CMAKE_BUILD_TYPE} MATCHES COVERAGE) # set default include directories INCLUDE_DIRECTORIES(${EXTRA_INCLUDE_DIRS})