File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ else( MSVC )
198
198
option (LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON )
199
199
endif ()
200
200
201
- option (LLVM_ENABLE_CXX11 "Compile with C++11 enabled." ON )
201
+ option (LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF )
202
202
option (LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF )
203
203
option (LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON )
204
204
option (LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF )
Original file line number Diff line number Diff line change @@ -287,10 +287,17 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
287
287
if (LLVM_ENABLE_WERROR )
288
288
add_llvm_definitions ( -Werror )
289
289
endif (LLVM_ENABLE_WERROR )
290
- if (LLVM_ENABLE_CXX11 )
290
+ if (LLVM_ENABLE_CXX1Y )
291
+ check_cxx_compiler_flag ("-std=c++1y" CXX_SUPPORTS_CXX1Y )
292
+ append_if (CXX_SUPPORTS_CXX1Y "-std=c++1y" CMAKE_CXX_FLAGS )
293
+ else ()
291
294
check_cxx_compiler_flag ("-std=c++11" CXX_SUPPORTS_CXX11 )
292
- append_if (CXX_SUPPORTS_CXX11 "-std=c++11" CMAKE_CXX_FLAGS )
293
- endif (LLVM_ENABLE_CXX11 )
295
+ if (CXX_SUPPORTS_CXX11 )
296
+ append ("-std=c++11" CMAKE_CXX_FLAGS )
297
+ else ()
298
+ message (FATAL_ERROR "LLVM requires C++11 support but the '-std=c++11' flag isn't supported." )
299
+ endif ()
300
+ endif ()
294
301
endif ( MSVC )
295
302
296
303
macro (append_common_sanitizer_flags )
You can’t perform that action at this time.
0 commit comments