Skip to content

Commit 2bc80c7

Browse files
authored
Merge pull request SqliteModernCpp#204 from marciso/upgrade_hunter_and_catch2
upgrade hunter to newest version (to support MSVC 2019); upgrade to Catch2
2 parents 5fc7371 + e979c4c commit 2bc80c7

21 files changed

+28
-26
lines changed

CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,21 @@ SET(CMAKE_EXPORT_COMPILE_COMMANDS ON)
66
set (CMAKE_CXX_STANDARD 17)
77

88
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
9+
set(HUNTER_TLS_VERIFY ON)
910
include("cmake/HunterGate.cmake")
1011
include("cmake/Catch.cmake")
1112

1213
HunterGate(
13-
URL "https://github.com/ruslo/hunter/archive/v0.19.227.tar.gz"
14-
SHA1 "808b778a443fcdf19c2d18fea8fa4bb59d16596a"
14+
URL "https://github.com/ruslo/hunter/archive/v0.23.214.tar.gz"
15+
SHA1 "e14bc153a7f16d6a5eeec845fb0283c8fad8c358"
1516
)
1617

1718
project(SqliteModernCpp)
1819

1920
hunter_add_package(Catch)
2021
hunter_add_package(sqlite3)
2122

22-
find_package(Catch CONFIG REQUIRED)
23+
find_package(Catch2 CONFIG REQUIRED)
2324
find_package(sqlite3 CONFIG REQUIRED)
2425

2526
set(TEST_SOURCE_DIR ${CMAKE_SOURCE_DIR}/tests)
@@ -37,9 +38,9 @@ target_include_directories(sqlite_modern_cpp INTERFACE hdr/)
3738
add_executable(tests ${TEST_SOURCES})
3839
target_include_directories(tests INTERFACE ${SQLITE3_INCLUDE_DIRS})
3940
if(ENABLE_SQLCIPHER_TESTS)
40-
target_link_libraries(tests Catch::Catch sqlite_modern_cpp sqlite3::sqlite3 -lsqlcipher)
41+
target_link_libraries(tests Catch2::Catch2 sqlite_modern_cpp sqlite3::sqlite3 -lsqlcipher)
4142
else()
42-
target_link_libraries(tests Catch::Catch sqlite_modern_cpp sqlite3::sqlite3)
43+
target_link_libraries(tests Catch2::Catch2 sqlite_modern_cpp sqlite3::sqlite3)
4344
endif()
4445

4546
catch_discover_tests(tests)

tests/blob_example.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <cstdlib>
33
#include <vector>
44
#include <string>
5-
#include <catch.hpp>
5+
#include <catch2/catch.hpp>
66
#include <sqlite_modern_cpp.h>
77
using namespace sqlite;
88
using namespace std;

tests/error_log.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <stdexcept>
66
#include <sqlite_modern_cpp.h>
77
#include <sqlite_modern_cpp/log.h>
8-
#include <catch.hpp>
8+
#include <catch2/catch.hpp>
99
using namespace sqlite;
1010
using namespace std;
1111

tests/exception_dont_execute.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <memory>
44
#include <stdexcept>
55
#include <sqlite_modern_cpp.h>
6-
#include <catch.hpp>
6+
#include <catch2/catch.hpp>
77
using namespace sqlite;
88
using namespace std;
99

tests/exception_dont_execute_nested.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <memory>
44
#include <stdexcept>
55
#include <sqlite_modern_cpp.h>
6-
#include <catch.hpp>
6+
#include <catch2/catch.hpp>
77
using namespace sqlite;
88
using namespace std;
99

tests/exceptions.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <memory>
55
#include <stdexcept>
66
#include <sqlite_modern_cpp.h>
7-
#include <catch.hpp>
7+
#include <catch2/catch.hpp>
88
using namespace sqlite;
99
using namespace std;
1010

tests/flags.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <cstdlib>
44
#include <sqlite_modern_cpp.h>
55
#include <sys/types.h>
6-
#include <catch.hpp>
6+
#include <catch2/catch.hpp>
77
using namespace sqlite;
88
using namespace std;
99

tests/functions.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <cstdlib>
33
#include <cmath>
44
#include <sqlite_modern_cpp.h>
5-
#include <catch.hpp>
5+
#include <catch2/catch.hpp>
66
using namespace sqlite;
77
using namespace std;
88

tests/functors.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <algorithm>
44
#include <string>
55
#include <sqlite_modern_cpp.h>
6-
#include <catch.hpp>
6+
#include <catch2/catch.hpp>
77

88
using namespace sqlite;
99
using namespace std;

tests/lvalue_functor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include<sqlite_modern_cpp.h>
33
#include<string>
44
#include<vector>
5-
#include<catch.hpp>
5+
#include<catch2/catch.hpp>
66
using namespace sqlite;
77
using namespace std;
88

0 commit comments

Comments
 (0)