From 4c4e82866ecd042856b7123a83f80c0ad80a5e13 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Mon, 24 Oct 2022 22:42:31 +0900 Subject: [PATCH 1/2] feat: CMAKE_CXX_STD should be given by the enduser --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dafac9..7f1e51f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,9 @@ include(CheckCXXCompilerFlag) if("${CMAKE_VERSION}" VERSION_GREATER 3.1) set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Boolean specifying whether compiler specific extensions are requested.") 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() set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Boolean describing whether the value of CXX_STANDARD is a requirement.") else() From 7ec3086f194c1c85dc78f8a800475f34e8f25919 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Mon, 24 Oct 2022 22:55:43 +0900 Subject: [PATCH 2/2] ci: update appveyor script --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9fc6a73..3871566 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,7 +17,7 @@ build_script: - cd C:\toml11 - mkdir build - cd build - - cmake -G"%generator%" -DBOOST_ROOT=C:/Libraries/boost_1_69_0 -Dtoml11_BUILD_TEST=ON .. + - cmake -G"%generator%" -DCMAKE_CXX_STANDARD=11 -DBOOST_ROOT=C:/Libraries/boost_1_69_0 -Dtoml11_BUILD_TEST=ON .. - cmake --build . --config "%configuration%" - file --mime-encoding tests/toml/tests/hard_example_unicode.toml