g++ knows about C++98 selection flags since at least 3.4

https://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/C-Dialect-Options.html#C-Dialect-Options
This commit is contained in:
Rolf Eike Beer
2017-02-08 18:18:17 +01:00
parent 787c5f37dd
commit e2ee097147

View File

@@ -11,8 +11,7 @@ else()
endif()
endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4)
# Supported since 4.3
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "-std=c++98")
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
endif()