From 47b86b5d46dca571c5e841445c007cf1cd02b9ce Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Tue, 19 Sep 2023 22:09:43 +0200 Subject: [PATCH] CMake: Require a C++11 compiler for the optional test suite --- expat/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index d82d06d0..ee9d9b8c 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -167,6 +167,10 @@ endif() if(EXPAT_BUILD_TESTS) # We have to call enable_language() before modifying any CMAKE_CXX_* variables enable_language(CXX) + + set(CMAKE_CXX_STANDARD 11) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) # i.e. -std=c++11 rather than default -std=gnu++11 endif() #