Skip to content

Commit

Permalink
fix: tests would not build because module path of catch2 was wrong
Browse files Browse the repository at this point in the history
Signed-off-by: Franz R. Sattler <[email protected]>
  • Loading branch information
Franz R. Sattler committed Jan 10, 2025
1 parent 541de63 commit f4f439f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DiFfRG/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ add_subdirectory(src)
# Testing
# ##############################################################################

option(DiFfRG_BUILD_TESTS "Build documentation" ON)
option(DiFfRG_BUILD_TESTS "Build tests" ON)

if(DiFfRG_BUILD_TESTS)
enable_testing()
Expand Down
2 changes: 1 addition & 1 deletion DiFfRG/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ cpmaddpackage(
OPTIONS
"CATCH_INSTALL_DOCS OFF"
"CATCH_INSTALL_HELPERS OFF")
list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/extras)

function(setup_test TARGET)
setup_target(${TARGET})
Expand All @@ -27,7 +28,6 @@ function(setup_benchmark TARGET)
target_link_libraries(${TARGET} DiFfRG::DiFfRG Catch2::Catch2WithMain)
endfunction()

list(APPEND CMAKE_MODULE_PATH ${lib_Catch2_SOURCE_DIR}/extras)
include(CTest)
include(Catch)

Expand Down
7 changes: 0 additions & 7 deletions DiFfRG/tests/physics/integration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ if(USE_CUDA)

add_executable(test_integrator_4D_qmc_gpu integrator_4D_qmc.cu)
setup_test(test_integrator_4D_qmc_gpu)

find_package(OpenACC REQUIRED)
add_executable(test_integrator_4D_oacc integrator_4D_oacc.cu)
target_compile_options(
test_integrator_4D_oacc PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:
--compiler-options -fopenacc >)
setup_test(test_integrator_4D_oacc)
endif()

# ##############################################################################
Expand Down

0 comments on commit f4f439f

Please sign in to comment.