Update Abseil to 20230125.3
raise minimum requirements to CMake 3.12 and C++14
This commit is contained in:
parent
cf3c96ba8d
commit
29b2effee8
4 changed files with 9 additions and 17 deletions
|
|
@ -2,10 +2,7 @@ if(WIN32)
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_policy(SET CMP0091 NEW)
|
||||
else()
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
if(POLICY CMP0069)
|
||||
cmake_policy(SET CMP0069 NEW)
|
||||
endif()
|
||||
cmake_minimum_required(VERSION 3.12)
|
||||
endif()
|
||||
|
||||
project(libsfizz
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@ include(CheckCXXCompilerFlag)
|
|||
include(CheckCXXSourceCompiles)
|
||||
include(GNUWarnings)
|
||||
|
||||
# TODO:
|
||||
# C++14 is the minimum standard version required by Abseil LTS 20230125.1 and later, see
|
||||
# https://github.com/abseil/abseil-cpp/releases/tag/20230125.1
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ standard to be used")
|
||||
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to be used")
|
||||
set(CMAKE_C_STANDARD 99 CACHE STRING "C standard to be used")
|
||||
|
||||
# Export the compile_commands.json file
|
||||
|
|
|
|||
|
|
@ -52,20 +52,16 @@ if(APPLE)
|
|||
endif()
|
||||
|
||||
# Add Abseil
|
||||
|
||||
# WARNING: When enabling SFIZZ_USE_SYSTEM_ABSEIL and the installed
|
||||
# library was built with C++17, the build fails if CMAKE_CXX_STANDARD
|
||||
# is set to 14. This happens at least with Archlinux and FreeBSD.
|
||||
# We'll need also to check if to set ABSL_PROPAGATE_CXX_STD=OFF in future versions.
|
||||
if(SFIZZ_USE_SYSTEM_ABSEIL)
|
||||
find_package(absl REQUIRED)
|
||||
if(absl_FOUND)
|
||||
# FIXME:
|
||||
# 1. Workaround for silent Abseil module, see #1117
|
||||
# Workaround for silent Abseil module, see #1117
|
||||
message(STATUS "Found system Abseil libraries, version ${absl_VERSION}")
|
||||
# 2. The current Abseil LTS version requires at least C++14, see
|
||||
# https://github.com/abseil/abseil-cpp/releases/tag/20230125.1
|
||||
# but results in errors by using std::string_view, optional etc.,
|
||||
# due to an ABI incompatibility with the installed system library
|
||||
# when built with C++17. This is happens at least with Archlinux and FreeBSD,
|
||||
# so in cases like these a -D CMAKE_CXX_STANDARD=17 is required.
|
||||
# 3. We'll need also to check if to set ABSL_PROPAGATE_CXX_STD=OFF
|
||||
# in future versions because the above issue.
|
||||
|
||||
# Make Abseil to be usable globally also for plugins project:
|
||||
# in CMake 3.24+ we can use `find_package(absl REQUIRED GLOBAL)`,
|
||||
|
|
|
|||
2
external/abseil-cpp
vendored
2
external/abseil-cpp
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 273292d1cfc0a94a65082ee350509af1d113344d
|
||||
Subproject commit c2435f8342c2d0ed8101cb43adfd605fdc52dca2
|
||||
Loading…
Add table
Reference in a new issue