From d50b31be35ed113a41f3944179f8e4a362018f86 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 23 Jul 2019 08:50:30 -0400 Subject: Clang: For MSVC ABI do not use modes older than C++14 Since commit d44c0db0b2 (clang: setup correct configuration in gnu mode, 2019-02-20, v3.15.0-rc1~41^2~5) we support the GNU-like Clang that targets the MSVC ABI. However, Clang cannot compile with the MSVC standard library unless it runs in a mode aware of C++14 (since MSVC itself does not even have a lower mode). When `CMAKE_CXX_STANDARD` is set to 98 or 11, use C++14 anyway. Since Clang's default mode is aware of C++14, another option is to not add any flags for 98 or 11. However, if a future Clang version ever defaults to a higher C++ standard, setting the standard to 98 or 11 should at least not use a mode higher than 14. Also revert test updates from commit 4819ff9647 (Tests: fix failures with gnu mode clang on windows, 2019-03-21, v3.15.0-rc1~41^2~3) that were meant to work around the standard selection problem. Fixes: #19496 --- Modules/Compiler/Clang-CXX.cmake | 7 +++++++ Tests/AliasTarget/CMakeLists.txt | 2 +- Tests/Complex/CMakeLists.txt | 5 ----- Tests/ComplexOneConfig/CMakeLists.txt | 5 ----- .../Module/WriteCompilerDetectionHeader/CMakeLists.txt | 4 +--- Tests/Plugin/CMakeLists.txt | 17 ++++++----------- Tests/RunCMake/GenerateExportHeader/GEH.cmake | 5 ----- 7 files changed, 15 insertions(+), 30 deletions(-) diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 17f3917..61709f8 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -58,6 +58,13 @@ if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU") unset(_clang_version_std17) if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") + # The MSVC standard library requires C++14, and MSVC itself has no + # notion of operating in a mode not aware of at least that standard. + set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++14") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++14") + set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++14") + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++14") + # This clang++ is missing some features because of MSVC compatibility. unset(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT) unset(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT) diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt index 6271988..fc70135 100644 --- a/Tests/AliasTarget/CMakeLists.txt +++ b/Tests/AliasTarget/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_CXX_STANDARD 98) # Clang/C2 in C++98 mode cannot properly handle some of MSVC headers if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 11) endif() add_library(foo SHARED empty.cpp) diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index fef83f6..2e41754 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -446,11 +446,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND set(CMAKE_CXX_STANDARD 11) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND - CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") - set(CMAKE_CXX_STANDARD 14) -endif() - # # Create the libs and the main exe # diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index 77baa4c..628cd4e 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -403,11 +403,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND set(CMAKE_CXX_STANDARD 11) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND - CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") - set(CMAKE_CXX_STANDARD 14) -endif() - # # Create the libs and the main exe # diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt index b30928d..cffef5a 100644 --- a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -133,9 +133,7 @@ endif() # for msvc the compiler version determines which c++11 features are available. if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" - OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" - AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC" - AND "x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC" )) + OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")) if(";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_delegating_constructors;") list(APPEND true_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) list(APPEND true_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt index c4540db..8e8fa07 100644 --- a/Tests/Plugin/CMakeLists.txt +++ b/Tests/Plugin/CMakeLists.txt @@ -5,17 +5,6 @@ project(Plugin) # We need proper C++98 support from the compiler set(CMAKE_CXX_STANDARD 98) -# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND - CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") - set(CMAKE_CXX_STANDARD 11) -endif() - -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND - CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") - set(CMAKE_CXX_STANDARD 14) -endif() - # Test per-target output directory properties. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${Plugin_BINARY_DIR}/lib/plugin) @@ -40,6 +29,12 @@ include_directories( ${Plugin_SOURCE_DIR}/include ) +# Clang/C2 in C++98 mode cannot properly handle some of MSVC headers +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND + CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") + set(CMAKE_CXX_STANDARD 11) +endif() + # Create an executable that exports an API for use by plugins. add_executable(example_exe src/example_exe.cxx) set_target_properties(example_exe PROPERTIES diff --git a/Tests/RunCMake/GenerateExportHeader/GEH.cmake b/Tests/RunCMake/GenerateExportHeader/GEH.cmake index b3f1c7f..ae9a84c 100644 --- a/Tests/RunCMake/GenerateExportHeader/GEH.cmake +++ b/Tests/RunCMake/GenerateExportHeader/GEH.cmake @@ -51,11 +51,6 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND set(CMAKE_CXX_STANDARD 11) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND - CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU") - set(CMAKE_CXX_STANDARD 14) -endif() - add_subdirectory(lib_shared_and_static) if(CMAKE_SYSTEM_NAME MATCHES "AIX" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" -- cgit v0.12 From 4f15a6a5c200be8235c3e38390aba438186e7f19 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 24 Jul 2019 07:29:21 -0400 Subject: Tests: Revert "require C++14 for the Tutorial" Revert commit a2a90f41e3 (Tests: require C++14 for the Tutorial, 2019-03-21, v3.15.0-rc1~41^2~2). In commit d50b31be35 (Clang: For MSVC ABI do not use modes older than C++14, 2019-07-23) we fixed the C++ standard selection for GNU-like Clang with the MSVC ABI so the test code itself no longer needs to do it. In particular, changing the tests in this way broke the tutorial's narrative. --- Tests/Tutorial/Complete/CMakeLists.txt | 3 ++- Tests/Tutorial/Consumer/CMakeLists.txt | 3 ++- Tests/Tutorial/Step10/CMakeLists.txt | 3 ++- Tests/Tutorial/Step11/CMakeLists.txt | 3 ++- Tests/Tutorial/Step2/CMakeLists.txt | 4 +++- Tests/Tutorial/Step2/directions.txt | 3 ++- Tests/Tutorial/Step3/CMakeLists.txt | 3 ++- Tests/Tutorial/Step4/CMakeLists.txt | 3 ++- Tests/Tutorial/Step5/CMakeLists.txt | 3 ++- Tests/Tutorial/Step6/CMakeLists.txt | 3 ++- Tests/Tutorial/Step7/CMakeLists.txt | 3 ++- Tests/Tutorial/Step8/CMakeLists.txt | 3 ++- Tests/Tutorial/Step9/CMakeLists.txt | 3 ++- 13 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Tests/Tutorial/Complete/CMakeLists.txt b/Tests/Tutorial/Complete/CMakeLists.txt index 1c97545..9658e65 100644 --- a/Tests/Tutorial/Complete/CMakeLists.txt +++ b/Tests/Tutorial/Complete/CMakeLists.txt @@ -7,7 +7,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) option(BUILD_SHARED_LIBS "Build using shared libraries" ON) diff --git a/Tests/Tutorial/Consumer/CMakeLists.txt b/Tests/Tutorial/Consumer/CMakeLists.txt index 5097917..4033b4d 100644 --- a/Tests/Tutorial/Consumer/CMakeLists.txt +++ b/Tests/Tutorial/Consumer/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) if(NOT DEFINED CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED True) endif() diff --git a/Tests/Tutorial/Step10/CMakeLists.txt b/Tests/Tutorial/Step10/CMakeLists.txt index 79aadd5..b1d46c4 100644 --- a/Tests/Tutorial/Step10/CMakeLists.txt +++ b/Tests/Tutorial/Step10/CMakeLists.txt @@ -7,7 +7,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) option(BUILD_SHARED_LIBS "Build using shared libraries" ON) diff --git a/Tests/Tutorial/Step11/CMakeLists.txt b/Tests/Tutorial/Step11/CMakeLists.txt index 79aadd5..b1d46c4 100644 --- a/Tests/Tutorial/Step11/CMakeLists.txt +++ b/Tests/Tutorial/Step11/CMakeLists.txt @@ -7,7 +7,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) option(BUILD_SHARED_LIBS "Build using shared libraries" ON) diff --git a/Tests/Tutorial/Step2/CMakeLists.txt b/Tests/Tutorial/Step2/CMakeLists.txt index 8e50e7c..48afaa3 100644 --- a/Tests/Tutorial/Step2/CMakeLists.txt +++ b/Tests/Tutorial/Step2/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) + # the version number. set(Tutorial_VERSION_MAJOR 1) set(Tutorial_VERSION_MINOR 0) diff --git a/Tests/Tutorial/Step2/directions.txt b/Tests/Tutorial/Step2/directions.txt index 48de7a2..bb6662c 100644 --- a/Tests/Tutorial/Step2/directions.txt +++ b/Tests/Tutorial/Step2/directions.txt @@ -44,7 +44,8 @@ the following: cmake_minimum_required(VERSION 3.3) project(Tutorial) - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED True) # the version number. set(Tutorial_VERSION_MAJOR 1) diff --git a/Tests/Tutorial/Step3/CMakeLists.txt b/Tests/Tutorial/Step3/CMakeLists.txt index baa0a44..f904ea7 100644 --- a/Tests/Tutorial/Step3/CMakeLists.txt +++ b/Tests/Tutorial/Step3/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # should we use our own math functions option(USE_MYMATH "Use tutorial provided math implementation" ON) diff --git a/Tests/Tutorial/Step4/CMakeLists.txt b/Tests/Tutorial/Step4/CMakeLists.txt index 9ce60b9..34eab55 100644 --- a/Tests/Tutorial/Step4/CMakeLists.txt +++ b/Tests/Tutorial/Step4/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # should we use our own math functions option(USE_MYMATH "Use tutorial provided math implementation" ON) diff --git a/Tests/Tutorial/Step5/CMakeLists.txt b/Tests/Tutorial/Step5/CMakeLists.txt index 828b9fc..63e5410 100644 --- a/Tests/Tutorial/Step5/CMakeLists.txt +++ b/Tests/Tutorial/Step5/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # should we use our own math functions option(USE_MYMATH "Use tutorial provided math implementation" ON) diff --git a/Tests/Tutorial/Step6/CMakeLists.txt b/Tests/Tutorial/Step6/CMakeLists.txt index a78b0ff..503a312 100644 --- a/Tests/Tutorial/Step6/CMakeLists.txt +++ b/Tests/Tutorial/Step6/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # the version number. set(Tutorial_VERSION_MAJOR 1) diff --git a/Tests/Tutorial/Step7/CMakeLists.txt b/Tests/Tutorial/Step7/CMakeLists.txt index 33aa039..f2d3839 100644 --- a/Tests/Tutorial/Step7/CMakeLists.txt +++ b/Tests/Tutorial/Step7/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # the version number. set(Tutorial_VERSION_MAJOR 1) diff --git a/Tests/Tutorial/Step8/CMakeLists.txt b/Tests/Tutorial/Step8/CMakeLists.txt index 03dc7c0..c66bf96 100644 --- a/Tests/Tutorial/Step8/CMakeLists.txt +++ b/Tests/Tutorial/Step8/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # the version number. set(Tutorial_VERSION_MAJOR 1) diff --git a/Tests/Tutorial/Step9/CMakeLists.txt b/Tests/Tutorial/Step9/CMakeLists.txt index 4981fe2..309d513 100644 --- a/Tests/Tutorial/Step9/CMakeLists.txt +++ b/Tests/Tutorial/Step9/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # the version number. set(Tutorial_VERSION_MAJOR 1) -- cgit v0.12 From 161b33f12b9a225607a4ea8339eabd4875bebbfe Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 24 Jul 2019 07:29:21 -0400 Subject: Help/guide/tutorial: Revert "require C++14 for the Tutorial" Revert the changes from commit a2a90f41e3 (Tests: require C++14 for the Tutorial, 2019-03-21, v3.15.0-rc1~41^2~2) for the content in its new home. In commit d50b31be35 (Clang: For MSVC ABI do not use modes older than C++14, 2019-07-23) we fixed the C++ standard selection for GNU-like Clang with the MSVC ABI so the test code itself no longer needs to do it. In particular, changing the tests in this way broke the tutorial's narrative. --- Help/guide/tutorial/Complete/CMakeLists.txt | 3 ++- Help/guide/tutorial/Consumer/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step10/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step11/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step2/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step3/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step4/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step5/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step6/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step7/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step8/CMakeLists.txt | 3 ++- Help/guide/tutorial/Step9/CMakeLists.txt | 3 ++- 12 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Help/guide/tutorial/Complete/CMakeLists.txt b/Help/guide/tutorial/Complete/CMakeLists.txt index e84f932..bea611c 100644 --- a/Help/guide/tutorial/Complete/CMakeLists.txt +++ b/Help/guide/tutorial/Complete/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # set the version number set(Tutorial_VERSION_MAJOR 1) diff --git a/Help/guide/tutorial/Consumer/CMakeLists.txt b/Help/guide/tutorial/Consumer/CMakeLists.txt index 5097917..4033b4d 100644 --- a/Help/guide/tutorial/Consumer/CMakeLists.txt +++ b/Help/guide/tutorial/Consumer/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) if(NOT DEFINED CMAKE_CXX_STANDARD) - set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED True) endif() diff --git a/Help/guide/tutorial/Step10/CMakeLists.txt b/Help/guide/tutorial/Step10/CMakeLists.txt index 5819272..25bc0c1 100644 --- a/Help/guide/tutorial/Step10/CMakeLists.txt +++ b/Help/guide/tutorial/Step10/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # Set the version number set(Tutorial_VERSION_MAJOR 1) diff --git a/Help/guide/tutorial/Step11/CMakeLists.txt b/Help/guide/tutorial/Step11/CMakeLists.txt index 2e5cb15..8f29fe2 100644 --- a/Help/guide/tutorial/Step11/CMakeLists.txt +++ b/Help/guide/tutorial/Step11/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # set the version number set(Tutorial_VERSION_MAJOR 1) diff --git a/Help/guide/tutorial/Step2/CMakeLists.txt b/Help/guide/tutorial/Step2/CMakeLists.txt index 1f43b2b..059b89a 100644 --- a/Help/guide/tutorial/Step2/CMakeLists.txt +++ b/Help/guide/tutorial/Step2/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # set the version number set(Tutorial_VERSION_MAJOR 1) diff --git a/Help/guide/tutorial/Step3/CMakeLists.txt b/Help/guide/tutorial/Step3/CMakeLists.txt index 966c38a..9804abf 100644 --- a/Help/guide/tutorial/Step3/CMakeLists.txt +++ b/Help/guide/tutorial/Step3/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # should we use our own math functions option(USE_MYMATH "Use tutorial provided math implementation" ON) diff --git a/Help/guide/tutorial/Step4/CMakeLists.txt b/Help/guide/tutorial/Step4/CMakeLists.txt index a157bda..0ae2648 100644 --- a/Help/guide/tutorial/Step4/CMakeLists.txt +++ b/Help/guide/tutorial/Step4/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # should we use our own math functions option(USE_MYMATH "Use tutorial provided math implementation" ON) diff --git a/Help/guide/tutorial/Step5/CMakeLists.txt b/Help/guide/tutorial/Step5/CMakeLists.txt index 76b9179..dac9b45 100644 --- a/Help/guide/tutorial/Step5/CMakeLists.txt +++ b/Help/guide/tutorial/Step5/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # should we use our own math functions option(USE_MYMATH "Use tutorial provided math implementation" ON) diff --git a/Help/guide/tutorial/Step6/CMakeLists.txt b/Help/guide/tutorial/Step6/CMakeLists.txt index 5829891..1465e46 100644 --- a/Help/guide/tutorial/Step6/CMakeLists.txt +++ b/Help/guide/tutorial/Step6/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # set the version number set(Tutorial_VERSION_MAJOR 1) diff --git a/Help/guide/tutorial/Step7/CMakeLists.txt b/Help/guide/tutorial/Step7/CMakeLists.txt index 17e6a60..a1efa77 100644 --- a/Help/guide/tutorial/Step7/CMakeLists.txt +++ b/Help/guide/tutorial/Step7/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # set the version number set(Tutorial_VERSION_MAJOR 1) diff --git a/Help/guide/tutorial/Step8/CMakeLists.txt b/Help/guide/tutorial/Step8/CMakeLists.txt index 86725e8..a0316a0 100644 --- a/Help/guide/tutorial/Step8/CMakeLists.txt +++ b/Help/guide/tutorial/Step8/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # set the version number set(Tutorial_VERSION_MAJOR 1) diff --git a/Help/guide/tutorial/Step9/CMakeLists.txt b/Help/guide/tutorial/Step9/CMakeLists.txt index 07ab90a..e610b99 100644 --- a/Help/guide/tutorial/Step9/CMakeLists.txt +++ b/Help/guide/tutorial/Step9/CMakeLists.txt @@ -1,7 +1,8 @@ cmake_minimum_required(VERSION 3.3) project(Tutorial) -set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED True) # set the version number set(Tutorial_VERSION_MAJOR 1) -- cgit v0.12