Skip to content

Commit f35a81f

Browse files
committed
Replace fatal with warning to proceed the build
1 parent bcb619b commit f35a81f

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,15 @@ include(${CMAKE}/fetch/modern.cpp.core.cmake)
5050

5151
# External Project Dependencies
5252
include(${CMAKE}/external/zlib.cmake)
53+
5354
if(NOT ICU_FOUND)
5455
include(${CMAKE}/external/icu.cmake)
5556
endif()
57+
5658
if(WIN32)
5759
include(${CMAKE}/fetch/jom.cmake)
5860
endif()
61+
5962
if(NOT SQLite3_FOUND)
6063
include(${CMAKE}/external/sqlite3.cmake)
6164
endif()

cmake/env.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ add_compile_options("$<$<CONFIG:DEBUG>:-DDEBUG>")
4444
# CMake
4545
set(CMAKE ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
4646

47-
# Force C++17 or C++20 if available
47+
# Force C++23 or C++20 if available
4848
include(CheckCXXCompilerFlag)
4949
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
50+
check_cxx_compiler_flag(/std:c++23 HAVE_FLAG_STD_CXX23)
5051
check_cxx_compiler_flag(/std:c++20 HAVE_FLAG_STD_CXX20)
5152
else()
53+
check_cxx_compiler_flag(-std=c++23 HAVE_FLAG_STD_CXX23)
54+
check_cxx_compiler_flag(-std=c++2b HAVE_FLAG_STD_CXX2B)
5255
check_cxx_compiler_flag(-std=c++20 HAVE_FLAG_STD_CXX20)
5356
check_cxx_compiler_flag(-std=c++2a HAVE_FLAG_STD_CXX2A)
5457
endif()
@@ -59,7 +62,9 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "[cC][lL][aA][nN][gG]" AND CMAKE_CXX_COMPILER_V
5962
set(HAVE_FLAG_STD_CXX2A 0)
6063
endif()
6164

62-
if(HAVE_FLAG_STD_CXX20 OR HAVE_FLAG_STD_CXX2A)
65+
if(HAVE_FLAG_STD_CXX23 OR HAVE_FLAG_STD_CXX2B)
66+
set(CMAKE_CXX_STANDARD 23)
67+
elseif(HAVE_FLAG_STD_CXX20 OR HAVE_FLAG_STD_CXX2A)
6368
set(CMAKE_CXX_STANDARD 20)
6469
else()
6570
set(CMAKE_CXX_STANDARD 17)

cmake/modules/FindSQLite3.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ else()
5656
endif()
5757

5858
IF (NOT SQLITE3_INCLUDE_DIR)
59-
MESSAGE(FATAL_ERROR "Could not find sqlite3.h in ${SQLITE3_INCLUDE_SEARCH_PATHS}")
59+
MESSAGE(WARNING "Could not find sqlite3.h in ${SQLITE3_INCLUDE_SEARCH_PATHS}")
6060
ENDIF (NOT SQLITE3_INCLUDE_DIR)
6161

6262
set(SQLITE3_NAMES sqlite3_i sqlite3)
@@ -96,9 +96,9 @@ endif(NOT SQLite3_FIND_QUIETLY)
9696
check_library_exists("${SQLITE3_LIBRARY}" sqlite3_enable_load_extension "" SQLITE3_LOAD_EXTENSION)
9797
IF (NOT SQLITE3_LOAD_EXTENSION)
9898
if (APPLE)
99-
MESSAGE(FATAL_ERROR "Found sqlite, but the sqlite3_enable_load_extension is disabled. On macOS, you should `brew install sqlite3` as the system sqlite3 library disables extension loading by default for security reasons.")
99+
MESSAGE(WARNING "Found sqlite, but the sqlite3_enable_load_extension is disabled. On macOS, you should `brew install sqlite3` as the system sqlite3 library disables extension loading by default for security reasons.")
100100
else()
101-
MESSAGE(FATAL_ERROR "Found sqlite, but the sqlite3_enable_load_extension is disabled")
101+
MESSAGE(WARNING "Found sqlite, but the sqlite3_enable_load_extension is disabled")
102102
endif()
103103
ENDIF (NOT SQLITE3_LOAD_EXTENSION)
104104

0 commit comments

Comments
 (0)