Merge topic 'clang-compile-options-cxx14'

49b8140e Clang: Enable c++14 dialect flag with Clang 3.5.
0b80fc35 Clang: Don't overwrite c++11 compile option value with c++14 flag.
This commit is contained in:
Brad King 2014-09-22 09:12:56 -04:00 committed by CMake Topic Stage
commit d4713b84b7
1 changed files with 6 additions and 3 deletions

View File

@ -23,9 +23,12 @@ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.1)
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x") set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++0x")
endif() endif()
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4) if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
set(CMAKE_CXX11_STANDARD_COMPILE_OPTION "-std=c++1y") set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++14")
set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++1y") set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_CXX14_STANDARD_COMPILE_OPTION "-std=c++1y")
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
endif() endif()
set(CMAKE_CXX_STANDARD_DEFAULT 98) set(CMAKE_CXX_STANDARD_DEFAULT 98)