mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-09-19 15:19:54 +00:00
feat: CMAKE_CXX_STD should be given by the enduser
This commit is contained in:
parent
b02aaed4fc
commit
4c4e82866e
@ -15,7 +15,9 @@ include(CheckCXXCompilerFlag)
|
|||||||
if("${CMAKE_VERSION}" VERSION_GREATER 3.1)
|
if("${CMAKE_VERSION}" VERSION_GREATER 3.1)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Boolean specifying whether compiler specific extensions are requested.")
|
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Boolean specifying whether compiler specific extensions are requested.")
|
||||||
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
if(NOT DEFINED CMAKE_CXX_STANDARD)
|
||||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "The C++ standard whose features are requested to build all targets.")
|
message(FATAL_ERROR "CMAKE_CXX_STANDARD is not defined. \
|
||||||
|
The C++ standard whose features are requested to *build* all targets. \
|
||||||
|
Remember that toml11 is a header only library that does NOT require compilation to use.")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Boolean describing whether the value of CXX_STANDARD is a requirement.")
|
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Boolean describing whether the value of CXX_STANDARD is a requirement.")
|
||||||
else()
|
else()
|
||||||
|
Loading…
Reference in New Issue
Block a user