Skip to content

Commit

Permalink
updates to cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
shutsch committed Feb 27, 2024
1 parent b26af38 commit 7962ccc
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion c_library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ if (IMAGINEMODELS_COMPILE_TESTS)
# Build tests
enable_testing()

set(TESTSOURCES uniform helix regular) #parameter_update positions derivatives)
set(TESTSOURCES uniform helix regular)

if (IMAGINEMODELS_USE_FFTW)
set(TESTSOURCES_RANDOM) #gaussianscalar)
endif()

add_executable(test_main "${PROJECT_SOURCE_DIR}/test/test_main.cc")
target_link_libraries(test_main ImagineModels ${LIBRARIES} Catch2::Catch2WithMain)
add_test(test_main test_main)
Expand All @@ -74,6 +79,15 @@ if (IMAGINEMODELS_COMPILE_TESTS)
target_link_libraries(${test_name} ImagineModels ${LIBRARIES} Catch2::Catch2WithMain)
add_test(${test_name} ${test_name})
endforeach()

if (IMAGINEMODELS_USE_FFTW)
foreach(test ${TESTSOURCES_RANDOM})
set(test_name ${test}_ctest)
add_executable(${test_name} "${PROJECT_SOURCE_DIR}/test/random/test_${test}.cc")
target_link_libraries(${test_name} ImagineModels ${LIBRARIES} Catch2::Catch2WithMain)
add_test(${test_name} ${test_name})
endforeach()
endif()
endif()


Expand Down

0 comments on commit 7962ccc

Please sign in to comment.