@@ -48,12 +48,12 @@ cmake_minimum_required(VERSION 3.10)
4848message (STATUS "CMake version ${CMAKE_VERSION } " )
4949
5050# Has to be set before `project()`, and ignored on non-macos:
51- set (CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "macOS deployment target (Apple clang only)" )
51+ set (CMAKE_OSX_DEPLOYMENT_TARGET 10.15 CACHE STRING "macOS deployment target (Apple clang only)" )
5252
5353project (beldex
54- VERSION 6 .0.0
54+ VERSION 7 .0.0
5555 LANGUAGES CXX C )
56- set (BELDEX_RELEASE_CODENAME "Hermes " )
56+ set (BELDEX_RELEASE_CODENAME "Obscura " )
5757
5858# String value to append to the full version string; this is intended to easily identify whether a
5959# binary was build from the release or development branches. This should be permanently set to an
@@ -290,6 +290,7 @@ if(NOT MANUAL_SUBMODULES)
290290 check_submodule (external/loki-mq cppzmq )
291291 if (BUILD_TESTS)
292292 check_submodule (external/googletest )
293+ check_submodule (external/Catch2 )
293294 endif ()
294295 check_submodule (external/uWebSockets uSockets )
295296 check_submodule (external/ghc-filesystem )
@@ -534,7 +535,7 @@ else()
534535 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS } ${ARCH_FLAG} " )
535536 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS } ${ARCH_FLAG} " )
536537
537- set (WARNINGS "-Wall -Wextra -Wpointer-arith -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-error=unused-variable -Wno-error=uninitialized" )
538+ set (WARNINGS "-Wall -Wextra -Wpointer-arith -Wwrite-strings -Wno-error=extra -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-unused-variable -Wno-error=unused-variable -Wno-error=uninitialized -Wno-error=attributes -Wno-error=unused-but-set-variable " )
538539
539540 option (WARNINGS_AS_ERRORS "Enable warning as errors" OFF )
540541 if (NOT MINGW AND WARNINGS_AS_ERRORS)
@@ -570,7 +571,6 @@ else()
570571
571572 # if those don't work for your compiler, single it out where appropriate
572573 if (CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT OPENBSD)
573- set (C_SECURITY_FLAGS "${C_SECURITY_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1" )
574574 set (C_SECURITY_FLAGS "${C_SECURITY_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1" )
575575 set (CXX_SECURITY_FLAGS "${CXX_SECURITY_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1" )
576576 endif ()
@@ -605,6 +605,12 @@ else()
605605 add_cxx_flag_if_supported (-fstack-clash-protection CXX_SECURITY_FLAGS )
606606 endif ()
607607
608+ # GCC 12's stringop-overflow warnings are really broken, with tons and tons of false positives all
609+ # over the place (not just in our code, but also in its own stdlibc++ code).
610+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12)
611+ set (CXX_WARNINGS "${CXX_WARNINGS} -Wno-stringop-overflow" )
612+ endif ()
613+
608614 # Removed in GCC 9.1 (or before ?), but still accepted, so spams the output
609615 if (NOT CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)
610616 add_c_flag_if_supported (-mmitigate-rop C_SECURITY_FLAGS )
@@ -856,7 +862,7 @@ if(BUILD_STATIC_DEPS)
856862 # sqlite3 target already set up
857863else ()
858864 add_library (sqlite3 INTERFACE )
859- pkg_check_modules (SQLITE3 REQUIRED sqlite3 IMPORTED_TARGET )
865+ pkg_check_modules (SQLITE3 REQUIRED sqlite3>=3.24.0 IMPORTED_TARGET )
860866 message (STATUS "Found sqlite3 ${SQLITE3_VERSION} " )
861867 target_link_libraries (sqlite3 INTERFACE PkgConfig::SQLITE3 )
862868endif ()
0 commit comments