CMake: Require a C++11 compiler for the optional test suite

This commit is contained in:
Sebastian Pipping 2023-09-19 22:09:43 +02:00
parent ede28c8fe0
commit 47b86b5d46

View file

@ -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()
#