Commit 652dcf05 authored by Kai Szuttor's avatar Kai Szuttor

cmake: set compile options in core again, due to reasons.

parent 790a8a11
Pipeline #3077 failed with stages
in 25 minutes and 38 seconds
......@@ -356,18 +356,6 @@ if(CMAKE_VERSION VERSION_LESS 3.1)
include(RequireCXX11)
endif()
if(WITH_COVERAGE)
add_compile_options("$<$<CONFIG:Release>:-g>")
add_compile_options("$<$<CONFIG:Release>:-O0>")
add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-fprofile-instr-generate>")
add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-fcoverage-mapping>")
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:Clang>>:--coverage>")
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:Clang>>:-fprofile-arcs>")
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:Clang>>:-ftest-coverage>")
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov")
endif()
endif()
if(APPLE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup")
......
......@@ -93,8 +93,18 @@ set(EspressoCore_SRC
virtual_sites.cpp
)
if(WITH_COVERAGE)
add_compile_options("$<$<CONFIG:Release>:-g>")
add_compile_options("$<$<CONFIG:Release>:-O0>")
add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-fprofile-instr-generate>")
add_compile_options("$<$<CXX_COMPILER_ID:Clang>:-fcoverage-mapping>")
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:Clang>>:--coverage>")
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:Clang>>:-fprofile-arcs>")
add_compile_options("$<$<NOT:$<CXX_COMPILER_ID:Clang>>:-ftest-coverage>")
if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgcov")
endif()
endif()
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/src/core/config-features.hpp ${CMAKE_BINARY_DIR}/src/core/config-features.cpp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment