From c6dff971cba77a5043d7ffefba398b6539069f69 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Tue, 1 Sep 2020 14:29:44 +0200 Subject: [PATCH] Do not generally override CXX standard. --- cmake/EthToolchains.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/EthToolchains.cmake b/cmake/EthToolchains.cmake index adf0a20a5..c2306bd75 100644 --- a/cmake/EthToolchains.cmake +++ b/cmake/EthToolchains.cmake @@ -1,5 +1,7 @@ # Require C++17. -set(CMAKE_CXX_STANDARD 17) # This requires at least CMake 3.8 to accept this C++17 flag. +if (NOT DEFINED CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) # This requires at least CMake 3.8 to accept this C++17 flag. +endif () set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS OFF)