Skip to content

Commit 2bc80c7

Browse files
authored
Merge pull request #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

+6-5
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

+1-1
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

tests/mov_ctor.cc

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

tests/named.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
#include <iostream>
22
#include <cstdlib>
33
#include <sqlite_modern_cpp.h>
4-
#include <catch.hpp>
4+
#include <catch2/catch.hpp>
55
using namespace sqlite;
66
using namespace std;
77

8+
89
TEST_CASE("binding named parameters works", "[named]") {
910
database db(":memory:");
1011

@@ -16,4 +17,4 @@ TEST_CASE("binding named parameters works", "[named]") {
1617
db << "SELECT b FROM foo WHERE a=?;" << 1 >> a;
1718

1819
REQUIRE(a == 2);
19-
}
20+
}

tests/nullptr_uniqueptr.cc

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

tests/prepared_statment.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <iostream>
22
#include <cstdlib>
33
#include <sqlite_modern_cpp.h>
4-
#include <catch.hpp>
4+
#include <catch2/catch.hpp>
55
using namespace sqlite;
66
using namespace std;
77

tests/readme_example.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define CATCH_CONFIG_MAIN
22
#include<iostream>
3-
#include <catch.hpp>
3+
#include <catch2/catch.hpp>
44
#include <sqlite_modern_cpp.h>
55

66
using namespace sqlite;

tests/shared_connection.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <cstdio>
33
#include <cstdlib>
44
#include <sqlite_modern_cpp.h>
5-
#include <catch.hpp>
5+
#include <catch2/catch.hpp>
66

77
using namespace sqlite;
88
using namespace std;

tests/simple_examples.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <cstdio>
33
#include <cstdlib>
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/std_optional.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <iostream>
22
#include <sqlite_modern_cpp.h>
3-
#include <catch.hpp>
3+
#include <catch2/catch.hpp>
44

55
using namespace sqlite;
66
using namespace std;

tests/string_view.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <sqlite_modern_cpp.h>
2-
#include <catch.hpp>
2+
#include <catch2/catch.hpp>
33

44

55
#ifdef MODERN_SQLITE_STRINGVIEW_SUPPORT

tests/trycatchblocks.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <cstdio>
44
#include <cstdlib>
55
#include <sqlite_modern_cpp.h>
6-
#include <catch.hpp>
6+
#include <catch2/catch.hpp>
77

88
using namespace sqlite;
99
using std::string;

tests/variant.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <iostream>
22
#include <cstdlib>
33
#include <sqlite_modern_cpp.h>
4-
#include <catch.hpp>
4+
#include <catch2/catch.hpp>
55
using namespace sqlite;
66
using namespace std;
77

0 commit comments

Comments
 (0)