Quellcode durchsuchen

Support older compilers with c++0x support but not C++-11

enhancement_3
Trevor Irons vor 8 Jahren
Ursprung
Commit
eb9a5bac70
1 geänderte Dateien mit 3 neuen und 0 gelöschten Zeilen
  1. 3
    0
      CMakeLists.txt

+ 3
- 0
CMakeLists.txt Datei anzeigen

@@ -165,11 +165,14 @@ endif()
165 165
 include(CheckCXXCompilerFlag)
166 166
 CHECK_CXX_COMPILER_FLAG(-std=c++14 COMPILER_SUPPORTS_CXX14)
167 167
 CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
168
+CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_CXX0X)
168 169
 
169 170
 if(COMPILER_SUPPORTS_CXX14)
170 171
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
171 172
 elseif(COMPILER_SUPPORTS_CXX11)
172 173
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
174
+elseif(COMPILER_SUPPORTS_CXX0X)
175
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
173 176
 else()
174 177
 	message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 or C++14 support. Please use a different C++ compiler.")
175 178
 endif()

Laden…
Abbrechen
Speichern