diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2017-05-01 07:46:44 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2017-05-01 07:46:44 -0700 |
commit | a7e699fe51a89df96deb2b852fcf67f13b94d24f (patch) | |
tree | 16f922763e3621158147a618fa8bff889252554f /cmake/Modules/GrBuildTypes.cmake | |
parent | 3c0d5d0eddb88ca7e1c0eee055765de9c6bc0259 (diff) | |
parent | ce64630d5ecb1186c6e857e84a51b831f5b86adf (diff) |
Merge branch 'master' into next
Diffstat (limited to 'cmake/Modules/GrBuildTypes.cmake')
-rw-r--r-- | cmake/Modules/GrBuildTypes.cmake | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/cmake/Modules/GrBuildTypes.cmake b/cmake/Modules/GrBuildTypes.cmake index 34614c9d08..5789d88934 100644 --- a/cmake/Modules/GrBuildTypes.cmake +++ b/cmake/Modules/GrBuildTypes.cmake @@ -38,7 +38,7 @@ set(__INCLUDED_GR_BUILD_TYPES_CMAKE TRUE) # build type below, make sure to add it to this list. list(APPEND AVAIL_BUILDTYPES None Debug Release RelWithDebInfo MinSizeRel - NoOptWithASM O2WithASM O3WithASM + Coverage NoOptWithASM O2WithASM O3WithASM ) ######################################################################## @@ -67,6 +67,37 @@ endfunction(GR_CHECK_BUILD_TYPE) ######################################################################## # For GCC and Clang, we can set a build type: # +# -DCMAKE_BUILD_TYPE=Coverage +# +# This type uses no optimization (-O0), outputs debug symbols (-g) and +# outputs all intermediary files the build system produces, including +# all assembly (.s) files. Look in the build directory for these +# files. +# NOTE: This is not defined on Windows systems. +######################################################################## +if(NOT WIN32) + SET(CMAKE_CXX_FLAGS_COVERAGE "-Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage" CACHE STRING + "Flags used by the C++ compiler during Coverage builds." FORCE) + SET(CMAKE_C_FLAGS_COVERAGE "-Wall -pedantic -pthread -g -O0 -fprofile-arcs -ftest-coverage" CACHE STRING + "Flags used by the C compiler during Coverage builds." FORCE) + SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE + "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING + "Flags used for linking binaries during Coverage builds." FORCE) + SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE + "-Wl,--warn-unresolved-symbols,--warn-once" CACHE STRING + "Flags used by the shared lib linker during Coverage builds." FORCE) + + MARK_AS_ADVANCED( + CMAKE_CXX_FLAGS_COVERAGE + CMAKE_C_FLAGS_COVERAGE + CMAKE_EXE_LINKER_FLAGS_COVERAGE + CMAKE_SHARED_LINKER_FLAGS_COVERAGE) +endif(NOT WIN32) + + +######################################################################## +# For GCC and Clang, we can set a build type: +# # -DCMAKE_BUILD_TYPE=NoOptWithASM # # This type uses no optimization (-O0), outputs debug symbols (-g) and |