You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, spdlog sets CMAKE_CXX_STANDARD 11. However, if the option SPDLOG_USE_STD_FORMAT is ON, the required standard should be 17 or higher, because std::string_view is required.
This can cause problems when using package managers such as vcpkg or conan. To enable SPDLOG_USE_STD_FORMAT, package managers need to patch spdlog's CMakelist.txt.
I suggest that spdlog's CMakeLists.txt should specify the CMAKE_CXX_STANDARD through target_compile_features based on the value of SPDLOG_USE_STD_FORMAT.
The text was updated successfully, but these errors were encountered:
@mdavis199
What if we specify CMAKE_CXX_STANDARD by target_compile_features, but also want to pass the parameter via cmake -DCMAKE_CXX_STANDARD?
gabime
changed the title
CMAKE_CXX_STANDARD is not set properly for spdlog's options
CMAKE_CXX_STANDARD should be c++20 if SPDLOG_USE_STD_FORMAT is set
Jun 13, 2022
By default,
spdlog
setsCMAKE_CXX_STANDARD 11
. However, if the optionSPDLOG_USE_STD_FORMAT
isON
, the required standard should be 17 or higher, becausestd::string_view
is required.This can cause problems when using package managers such as vcpkg or conan. To enable SPDLOG_USE_STD_FORMAT, package managers need to patch spdlog's CMakelist.txt.
I suggest that spdlog's CMakeLists.txt should specify the CMAKE_CXX_STANDARD through
target_compile_features
based on the value ofSPDLOG_USE_STD_FORMAT
.The text was updated successfully, but these errors were encountered: