From 19bfee1311deed4ce85196eaf6c4c9a410aa8ac0 Mon Sep 17 00:00:00 2001 From: Ivan Perez Date: Sat, 4 Nov 2023 17:15:51 -0700 Subject: [PATCH] Adjust check of sqlite3 version on MacOS (#223). Installation on MacOS fails partly because a sqlite3-related assertion in one of the pre-installation checks does not hold on MacOS. More specifically, the assertion in question is whether the version numbers of sqlite3 in the string SQLITE_VERSION and the one returned by sqlite3_libversion are the same. This is a known issue with the sqlite3 library, and is external to IKOS. This commit adds a condition around that assertion so that it is not checked on MacOS. --- cmake/FindSQLite3.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/FindSQLite3.cmake b/cmake/FindSQLite3.cmake index 0fc8b7ae..b6010792 100644 --- a/cmake/FindSQLite3.cmake +++ b/cmake/FindSQLite3.cmake @@ -63,7 +63,12 @@ if (NOT SQLITE3_FOUND) #include int main() { + // The following assertion does not always hold on macs, due to a bug in + // the sqlite3 setup shipped on Mac. So, we only check if the OS is not + // Apple. + #ifndef __APPLE__ assert(strcmp(SQLITE_VERSION, sqlite3_libversion()) == 0); + #endif printf(\"%s\", sqlite3_libversion()); return 0; }