summaryrefslogtreecommitdiffstats
path: root/cmake/Coverage.cmake
blob: 28efbf1c93b5b103ae6a2b41206321b2a05f6800 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
if(__COVERAGE_CMAKE__)
    return()
endif()
set(__COVERAGE_CMAKE__ TRUE)

if(MultiMC_CODE_COVERAGE)
    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 --coverage")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 --coverage")
    set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 --coverage")
    set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O0 --coverage")
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -O0 --coverage")
    set(CMAKE_BUILD_TYPE "Debug")
endif(MultiMC_CODE_COVERAGE)