mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
setting the cmake standard to 20 when using std format (#2680)
This commit is contained in:
@@ -25,7 +25,10 @@ endif()
|
||||
# ---------------------------------------------------------------------------------------
|
||||
# Compiler config
|
||||
# ---------------------------------------------------------------------------------------
|
||||
if(NOT CMAKE_CXX_STANDARD)
|
||||
if(SPDLOG_USE_STD_FORMAT)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
elseif(NOT CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
@@ -256,11 +259,6 @@ if(SPDLOG_NO_EXCEPTIONS AND NOT MSVC)
|
||||
target_compile_options(spdlog PRIVATE -fno-exceptions)
|
||||
endif()
|
||||
|
||||
if(SPDLOG_USE_STD_FORMAT)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
|
||||
# ---------------------------------------------------------------------------------------
|
||||
# Build binaries
|
||||
# ---------------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user