File tree Expand file tree Collapse file tree 5 files changed +10
-17
lines changed
Expand file tree Collapse file tree 5 files changed +10
-17
lines changed Original file line number Diff line number Diff line change @@ -3,19 +3,12 @@ include(DownloadProject)
33# Download and configure Catch2 for the tests
44download_project(PROJ Catch2
55 GIT_REPOSITORY https://github.com/catchorg/Catch2
6- GIT_TAG Catch1.x
6+ GIT_TAG master
77 UPDATE_DISCONNECTED 1
88)
9+ add_subdirectory (${Catch2_SOURCE_DIR} ${Catch2_BINARY_DIR} )
910list (APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR} /contrib)
1011
11- # Configure Catch2 so that it looks like a proper target
12- add_library (Catch2 INTERFACE )
13- add_library (Catch2::Catch2 ALIAS Catch2)
14- target_include_directories (Catch2 INTERFACE
15- $<BUILD_INTERFACE:${Catch2_SOURCE_DIR} /single_include>
16- $<INSTALL_INTERFACE:include >
17- )
18-
1912# Testsutie options
2013option (GFX_TIMSORT_USE_VALGRIND "Whether to run the tests with Valgrind" OFF )
2114set (GFX_TIMSORT_SANITIZE "" CACHE STRING "Comma-separated list of options to pass to -fsanitize" )
@@ -105,10 +98,10 @@ if (WIN32)
10598endif ()
10699
107100include (CTest)
108- include (ParseAndAddCatchTests )
101+ include (Catch )
109102
110- ParseAndAddCatchTests (cxx_98_tests)
111- ParseAndAddCatchTests (cxx_11_tests)
103+ catch_discover_tests (cxx_98_tests)
104+ catch_discover_tests (cxx_11_tests)
112105if (WIN32 )
113- ParseAndAddCatchTests (windows_tests)
106+ catch_discover_tests (windows_tests)
114107endif ()
Original file line number Diff line number Diff line change 99#include < stdexcept>
1010#include < utility>
1111#include < vector>
12- #include < catch.hpp>
12+ #include < catch2/ catch.hpp>
1313#include < gfx/timsort.hpp>
1414
1515// //////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change 99#include < iostream>
1010#include < utility>
1111#include < vector>
12- #include < catch.hpp>
12+ #include < catch2/ catch.hpp>
1313#include < gfx/timsort.hpp>
1414
1515namespace {
Original file line number Diff line number Diff line change 55 * SPDX-License-Identifier: MIT
66 */
77#define CATCH_CONFIG_MAIN
8- #include < catch.hpp>
8+ #include < catch2/ catch.hpp>
Original file line number Diff line number Diff line change 99#include < stdexcept>
1010#include < utility>
1111#include < vector>
12- #include < catch.hpp>
1312#include < windows.h>
13+ #include < catch2/catch.hpp>
1414#include < gfx/timsort.hpp>
1515
1616TEST_CASE ( " check inclusion of windows.h" ) {
You can’t perform that action at this time.
0 commit comments