@@ -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)
@@ -535,7 +536,7 @@ else()
535536 set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_FLAG} " )
536537 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG} " )
537538
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" )
539+ 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 " )
539540
540541 option (WARNINGS_AS_ERRORS "Enable warning as errors" OFF )
541542 if (NOT MINGW AND WARNINGS_AS_ERRORS)
@@ -571,7 +572,6 @@ else()
571572
572573 # if those don't work for your compiler, single it out where appropriate
573574 if (CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT OPENBSD)
574- set (C_SECURITY_FLAGS "${C_SECURITY_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1" )
575575 set (C_SECURITY_FLAGS "${C_SECURITY_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1" )
576576 set (CXX_SECURITY_FLAGS "${CXX_SECURITY_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1" )
577577 endif ()
@@ -606,6 +606,12 @@ else()
606606 add_cxx_flag_if_supported(-fstack-clash-protection CXX_SECURITY_FLAGS)
607607 endif ()
608608
609+ # GCC 12's stringop-overflow warnings are really broken, with tons and tons of false positives all
610+ # over the place (not just in our code, but also in its own stdlibc++ code).
611+ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 12)
612+ set (CXX_WARNINGS "${CXX_WARNINGS} -Wno-stringop-overflow" )
613+ endif ()
614+
609615 # Removed in GCC 9.1 (or before ?), but still accepted, so spams the output
610616 if (NOT CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1)
611617 add_c_flag_if_supported(-mmitigate-rop C_SECURITY_FLAGS)
@@ -857,7 +863,7 @@ if(BUILD_STATIC_DEPS)
857863 # sqlite3 target already set up
858864else ()
859865 add_library (sqlite3 INTERFACE )
860- pkg_check_modules(SQLITE3 REQUIRED sqlite3 IMPORTED_TARGET)
866+ pkg_check_modules(SQLITE3 REQUIRED sqlite3>=3.24.0 IMPORTED_TARGET)
861867 message (STATUS "Found sqlite3 ${SQLITE3_VERSION} " )
862868 target_link_libraries (sqlite3 INTERFACE PkgConfig::SQLITE3)
863869endif ()
0 commit comments