Commit 55793e26 authored by incardon's avatar incardon

Fixing compilation for testing coverage

parent e105e6ef
......@@ -10,6 +10,9 @@ add_executable(vcluster_test main.cpp VCluster/VCluster.cpp ../../openfpm_devic
if ( CMAKE_COMPILER_IS_GNUCC )
target_compile_options(vcluster_test PRIVATE "-Wno-deprecated-declarations")
if (TEST_COVERAGE)
target_compile_options(mem PRIVATE $<$<COMPILE_LANGUAGE:CXX>: -fprofile-arcs -ftest-coverage>)
endif()
endif()
add_library(vcluster STATIC VCluster/VCluster.cpp)
......@@ -19,6 +22,9 @@ add_library(vcluster STATIC VCluster/VCluster.cpp)
if(CUDA_FOUND)
target_compile_options(vcluster_test PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-Xcudafe "--display_error_number --diag_suppress=611 --diag_suppress=2885 --diag_suppress=2886 --diag_suppress=2887 --diag_suppress=2888 --diag_suppress=186 --diag_suppress=111" --expt-extended-lambda>)
target_include_directories (vcluster_test PUBLIC ${MPI_C_INCLUDE_DIRS})
if (TEST_COVERAGE)
target_compile_options(mem PRIVATE $<$<COMPILE_LANGUAGE:CUDA>: -Xcompiler "-fprofile-arcs -ftest-coverage">)
endif()
endif()
target_include_directories (vcluster_test PUBLIC ${CUDA_INCLUDE_DIRS})
......@@ -41,6 +47,9 @@ target_include_directories (vcluster PUBLIC ${Boost_INCLUDE_DIRS})
target_link_libraries(vcluster_test ${Boost_LIBRARIES})
target_link_libraries(vcluster_test ${PETSC_LIBRARIES})
if (TEST_COVERAGE)
target_link_libraries(vcluster_test -lgcov)
endif()
# Request that particles be built with -std=c++11
# As this is a public compile feature anything that links to particles
......
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