Merge pull request #2402 from cookcocck/fix_cmake_spdlog_use_std_format

Set c++20 when SPDLOG_USE_STD_FORMAT option is turned on
This commit is contained in:
Gabi Melman 2022-06-19 02:24:01 +03:00 committed by GitHub
commit a26e174b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,6 +243,11 @@ 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
# ---------------------------------------------------------------------------------------