Skip to content

Commit

Permalink
lcov: simplify path detection and use
Browse files Browse the repository at this point in the history
  • Loading branch information
cwsmith committed Sep 26, 2024
1 parent 559ba3c commit e21be22
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,27 +120,22 @@ if(meshFields_ENABLE_COVERAGE_BUILD)

append_coverage_compiler_flags()

set(CABANA_INSTALL_DIR "" CACHE PATH "Set the path to the cabana install directory so it isn't processed by lcov")
set(KOKKOS_INSTALL_DIR "" CACHE PATH "Set the path to the kokkos install directory so it isn't processed by lcov")
set(KOKKOSKERNELS_INSTALL_DIR "" CACHE PATH "Set the path to the kokkos kernels install directory so it isn't processed by lcov")
set(OMEGAH_INSTALL_DIR "" CACHE PATH "Set the path to the omegah install directory so it isn't processed by lcov")
set(LCOV_SYSTEM_EXCLUDE_PATHS "" CACHE PATH "Set path to system libraries, c++ compiler and cuda-11.4 by default, to be excluded from lcov analysis")


if (NOT DEFINED CACHE{CABANA_INSTALL_DIR})
message(ERROR " CABANA_INSTALL_DIR was not set or the path does not exist")
if (NOT EXISTS ${Cabana_DIR})
message(FATAL_ERROR " Cabana_DIR was not set or the path does not exist")
endif()

if (NOT DEFINED CACHE{KOKKOS_INSTALL_DIR})
message(ERROR " KOKKOS_INSTALL_DIR was not set or the path does not exist")
if (NOT EXISTS ${Kokkos_DIR})
message(FATAL_ERROR " Kokkos_DIR was not set or the path does not exist")
endif()

if (NOT DEFINED CACHE{KOKKOSKERNELS_INSTALL_DIR})
message(ERROR " KOKKOSKERNELS_INSTALL_DIR was not set or the path does not exist")
if (NOT EXISTS ${KokkosKernels_DIR})
message(FATAL_ERROR " KokkosKernels_DIR was not set or the path does not exist")
endif()

if (NOT DEFINED CACHE{OMEGAH_INSTALL_DIR})
message(ERROR " OMEGAH_INSTALL_DIR was not set or the path does not exist")
if (NOT EXISTS ${Omega_h_DIR})
message(FATAL_ERROR " Omega_h_DIR was not set or the path does not exist")
endif()

setup_target_for_coverage_lcov(
Expand All @@ -151,10 +146,10 @@ if(meshFields_ENABLE_COVERAGE_BUILD)
"${CMAKE_CURRENT_LIST_DIR}/.github/*"
"${CMAKE_CURRENT_BINARY_DIR}/nvcc_internal_extended_lambda_implementation"
"/tmp/*"
"${CABANA_INSTALL_DIR}"
"${KOKKOS_INSTALL_DIR}"
"${KOKKOSKERNELS_INSTALL_DIR}"
"${OMEGAH_INSTALL_DIR}"
"${Cabana_DIR}"
"${Kokkos_DIR}"
"${KokkosKernels_DIR}"
"${Omega_h_DIR}"
"${LCOV_SYSTEM_EXCLUDE_PATHS}"
)

Expand Down

0 comments on commit e21be22

Please sign in to comment.