From a1510849f8e613d39e98124e45bd7721f6eb59c6 Mon Sep 17 00:00:00 2001 From: Jorrit Wronski Date: Tue, 13 Dec 2022 11:01:56 +0100 Subject: [PATCH 1/2] Do not compare the version number for external SQLite3 libraries --- tests/Database_test.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Database_test.cpp b/tests/Database_test.cpp index a02231b2..49653a0b 100644 --- a/tests/Database_test.cpp +++ b/tests/Database_test.cpp @@ -34,6 +34,7 @@ void assertion_failed(const char* apFile, const long apLine, const char* apFunc, } #endif +#ifdef SQLITECPP_INTERNAL_SQLITE TEST(SQLiteCpp, version) { EXPECT_STREQ(SQLITE_VERSION, SQLite::VERSION); @@ -41,6 +42,7 @@ TEST(SQLiteCpp, version) EXPECT_STREQ(SQLITE_VERSION, SQLite::getLibVersion()); EXPECT_EQ (SQLITE_VERSION_NUMBER, SQLite::getLibVersionNumber()); } +#endif TEST(Database, ctorExecCreateDropExist) { From f1f1748f65dc6e1ac150e0760b4d71a6a6c6c750 Mon Sep 17 00:00:00 2001 From: Jorrit Wronski Date: Tue, 13 Dec 2022 11:03:10 +0100 Subject: [PATCH 2/2] Correct use of the __has_include preprocessor macro --- include/SQLiteCpp/Database.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/SQLiteCpp/Database.h b/include/SQLiteCpp/Database.h index e30ff947..3adde862 100644 --- a/include/SQLiteCpp/Database.h +++ b/include/SQLiteCpp/Database.h @@ -35,10 +35,10 @@ __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_13_0 // disable the support if the required header is not available #ifdef __has_include - #ifndef __has_include() + #if !__has_include() #undef SQLITECPP_HAVE_STD_FILESYSTEM #endif - #ifndef __has_include() + #if !__has_include() #undef SQLITECPP_HAVE_EXPERIMENTAL_FILESYSTEM #endif #endif