@@ -3,9 +3,9 @@ if(BUILD_TESTING)
33
44 FetchContent_Declare(
55 libcatch2
6- URL https://github.com/catchorg/Catch2/archive/v2.13.6 .tar.gz
7- # GIT_REPOSITORY https://github.com/catchorg/Catch2.git
8- # GIT_TAG 15cf3ca
6+ URL https://github.com/catchorg/Catch2/archive/v3.11.0 .tar.gz
7+ URL_HASH SHA1=5f5a932acf6990764c33ed80ee04f1c696f4d5bc
8+ DOWNLOAD_EXTRACT_TIMESTAMP true
99 )
1010
1111 FetchContent_MakeAvailable(libcatch2)
@@ -22,7 +22,7 @@ if(BUILD_TESTING)
2222 URL ${PROJECT_BINARY_DIR} /metadata_test_images.tar.gz
2323 )
2424 FetchContent_MakeAvailable(test_images)
25- add_executable (tester test -main.cpp test - basic.cpp test_exceptions.cpp)
25+ add_executable (tester test -basic.cpp test_exceptions.cpp)
2626 target_include_directories (tester PRIVATE ${PROJECT_SOURCE_DIR} /uiucprescon/imagevalidate)
2727
2828 target_compile_definitions (tester PRIVATE TEST_IMAGE_PATH="${test_images_SOURCE_DIR} " )
@@ -31,35 +31,22 @@ if(BUILD_TESTING)
3131 CXX_CPPCHECK ${CMAKE_CXX_CPPCHECK} ;--suppress=*:${libcatch2_SOURCE_DIR} /single_include/catch2/catch.hpp
3232 )
3333 endif ()
34- set_target_properties (tester PROPERTIES
35- CXX_STANDARD 11
36- RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
37- )
3834
39- target_link_libraries (tester PRIVATE Catch2 imagevalidate::glue)
35+ target_link_libraries (tester PRIVATE Catch2::Catch2WithMain imagevalidate::glue)
4036 catch_discover_tests(tester
4137 TEST_PREFIX imagevalidate.
4238 )
4339
4440 #############
4541
46- add_executable (tester-internal test -main.cpp tester-internal .cpp)
47- if (CMAKE_CXX_CPPCHECK)
48- set_property (TARGET tester-internal PROPERTY
49- CXX_CPPCHECK ${CMAKE_CXX_CPPCHECK} ;--suppress=*:${libcatch2_SOURCE_DIR} /single_include/catch2/catch.hpp
50- )
51- endif ()
42+ add_executable (tester-internal tester-internal .cpp)
5243 target_compile_definitions (tester-internal
5344 PRIVATE TEST_IMAGE_PATH="${test_images_SOURCE_DIR} " )
5445
55- set_target_properties (tester-internal PROPERTIES
56- CXX_STANDARD 11
57- RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
58- )
5946
6047 target_link_libraries (tester-internal
6148 PRIVATE
62- Catch2
49+ Catch2::Catch2WithMain
6350 glue
6451 )
6552 catch_discover_tests(tester-internal
0 commit comments