Skip to content

Commit 8223a1d

Browse files
author
Chris Bieneman
committedAug 29, 2016
[CMake] Use -std=c++11 if supported
Summary: This patch adds a check for if -std=c++11 is a supported flag, and adds it to CMAKE_CXX_FLAGS if it is supported. Reviewers: EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24007 llvm-svn: 280021
1 parent 6e1eaac commit 8223a1d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎libcxxabi/cmake/config-ix.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ check_cxx_compiler_flag(/EHsc LIBCXXABI_HAS_EHSC_FLAG)
3737
check_cxx_compiler_flag(/EHs- LIBCXXABI_HAS_NO_EHS_FLAG)
3838
check_cxx_compiler_flag(/EHa- LIBCXXABI_HAS_NO_EHA_FLAG)
3939
check_cxx_compiler_flag(/GR- LIBCXXABI_HAS_NO_GR_FLAG)
40+
check_cxx_compiler_flag(-std=c++11 LIBCXXABI_HAS_STD_CXX11)
41+
42+
if(LIBCXXABI_HAS_STD_CXX11)
43+
list(APPEND CMAKE_CXX_FLAGS -std=c++11)
44+
endif()
4045

4146
# Check libraries
4247
check_library_exists(c fopen "" LIBCXXABI_HAS_C_LIB)

0 commit comments

Comments
 (0)
Please sign in to comment.