mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-15 08:01:30 +08:00
setting the cmake standard to 20 when using std format (#2680)
This commit is contained in:
parent
706ad70591
commit
040874224b
@ -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
|
||||
# ---------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user