mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 16:57:16 +01:00
4a6bfc086c
Switched to POCO library for unified platform/library interface. Deprecated the external module API. It was creating more problems than solving. Removed most built-in libraries in favor of system libraries for easier maintenance. Cleaned and secured code with help from static analyzers.
30 lines
1.1 KiB
CMake
30 lines
1.1 KiB
CMake
# Code coverage
|
|
if(BUILD_CPR_TESTS AND GENERATE_COVERAGE)
|
|
set(CMAKE_BUILD_TYPE COVERAGE CACHE INTERNAL "Coverage enabled build")
|
|
message(STATUS "Enabling gcov support")
|
|
if(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|
set(COVERAGE_FLAG "--coverage")
|
|
endif()
|
|
set(CMAKE_CXX_FLAGS_COVERAGE
|
|
"-g -O0 ${COVERAGE_FLAG} -fprofile-arcs -ftest-coverage"
|
|
CACHE STRING "Flags used by the C++ compiler during coverage builds."
|
|
FORCE)
|
|
set(CMAKE_C_FLAGS_COVERAGE
|
|
"-g -O0 ${COVERAGE_FLAG} -fprofile-arcs -ftest-coverage"
|
|
CACHE STRING "Flags used by the C compiler during coverage builds."
|
|
FORCE)
|
|
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE
|
|
""
|
|
CACHE STRING "Flags used for linking binaries during coverage builds."
|
|
FORCE)
|
|
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
|
|
""
|
|
CACHE STRING "Flags used by the shared libraries 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()
|