From c3eff6ed50f0ffec75133ef02f23cb6d3321dd70 Mon Sep 17 00:00:00 2001 From: Christian Parpart Date: Wed, 22 Jul 2020 16:20:59 +0200 Subject: [PATCH] [cmake] C++ version should not be mandated by the toolchain setting, as it conflicts with Windows (CI) builds using vcpkg --- .circleci/config.yml | 2 +- cmake/EthToolchains.cmake | 5 +++++ cmake/toolchains/cxx20.cmake | 4 ---- cmake/toolchains/default.cmake | 4 ---- 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 cmake/toolchains/cxx20.cmake diff --git a/.circleci/config.yml b/.circleci/config.yml index f5ab32ccc..fbe76d594 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -487,7 +487,7 @@ jobs: <<: *build_ubuntu2004 environment: CMAKE_BUILD_TYPE: Debug - CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/cxx20.cmake -DUSE_CVC4=OFF + CMAKE_OPTIONS: -DCMAKE_CXX_STANDARD=20 -DUSE_CVC4=OFF MAKEFLAGS: -j 10 steps: - checkout diff --git a/cmake/EthToolchains.cmake b/cmake/EthToolchains.cmake index a4263b7df..adf0a20a5 100644 --- a/cmake/EthToolchains.cmake +++ b/cmake/EthToolchains.cmake @@ -1,3 +1,8 @@ +# Require C++17. +set(CMAKE_CXX_STANDARD 17) # This requires at least CMake 3.8 to accept this C++17 flag. +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +set(CMAKE_CXX_EXTENSIONS OFF) + if(NOT CMAKE_TOOLCHAIN_FILE) # Use default toolchain file if none is provided. set( diff --git a/cmake/toolchains/cxx20.cmake b/cmake/toolchains/cxx20.cmake deleted file mode 100644 index ad34e5749..000000000 --- a/cmake/toolchains/cxx20.cmake +++ /dev/null @@ -1,4 +0,0 @@ -# Require C++20. -set(CMAKE_CXX_STANDARD 20) # This requires at least CMake 3.12 to understand this C++20 flag -set(CMAKE_CXX_STANDARD_REQUIRED TRUE) -set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/cmake/toolchains/default.cmake b/cmake/toolchains/default.cmake index 07fc80e8e..e69de29bb 100644 --- a/cmake/toolchains/default.cmake +++ b/cmake/toolchains/default.cmake @@ -1,4 +0,0 @@ -# Require C++17. -set(CMAKE_CXX_STANDARD 17) # This requires at least CMake 3.8 to accept this C++17 flag. -set(CMAKE_CXX_STANDARD_REQUIRED TRUE) -set(CMAKE_CXX_EXTENSIONS OFF)