Commit f5ff3af2 authored by incardon's avatar incardon

Fixing compilation for test coverage

parent ad472449
......@@ -7,8 +7,18 @@ add_executable(numerics main.cpp Matrix/SparseMatrix_unit_tests.cpp interpolatio
###########################
if ( CMAKE_COMPILER_IS_GNUCC )
target_compile_options(numerics PRIVATE "-Wno-deprecated-declarations")
if (TEST_COVERAGE)
target_compile_options(numerics PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -fprofile-arcs -ftest-coverage>)
endif()
endif()
if(CUDA_FOUND)
target_compile_options(numerics PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe "--display_error_number --diag_suppress=2885 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111" --expt-extended-lambda>)
if (TEST_COVERAGE)
target_compile_options(numerics PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler "-fprofile-arcs -ftest-coverage">)
endif()
endif()
target_include_directories (numerics PUBLIC ${CUDA_INCLUDE_DIRS})
......@@ -46,6 +56,10 @@ endif()
target_link_libraries(numerics -L${METIS_ROOT}/lib metis)
if (TEST_COVERAGE)
target_link_libraries(numerics -lgcov)
endif()
# Request that particles be built with -std=c++11
# As this is a public compile feature anything that links to particles
# will also build with -std=c++11
......
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