[PATCH] D24007: [CMake] Use -std=c++11 if supported

Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 29 15:20:33 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL280021: [CMake] Use -std=c++11 if supported (authored by cbieneman).

Changed prior to commit:
  https://reviews.llvm.org/D24007?vs=69619&id=69624#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24007

Files:
  libcxxabi/trunk/cmake/config-ix.cmake

Index: libcxxabi/trunk/cmake/config-ix.cmake
===================================================================
--- libcxxabi/trunk/cmake/config-ix.cmake
+++ libcxxabi/trunk/cmake/config-ix.cmake
@@ -37,6 +37,11 @@
 check_cxx_compiler_flag(/EHs-                 LIBCXXABI_HAS_NO_EHS_FLAG)
 check_cxx_compiler_flag(/EHa-                 LIBCXXABI_HAS_NO_EHA_FLAG)
 check_cxx_compiler_flag(/GR-                  LIBCXXABI_HAS_NO_GR_FLAG)
+check_cxx_compiler_flag(-std=c++11            LIBCXXABI_HAS_STD_CXX11)
+
+if(LIBCXXABI_HAS_STD_CXX11)
+  list(APPEND CMAKE_CXX_FLAGS -std=c++11)
+endif()
 
 # Check libraries
 check_library_exists(c fopen "" LIBCXXABI_HAS_C_LIB)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24007.69624.patch
Type: text/x-patch
Size: 667 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160829/26dc45f2/attachment.bin>


More information about the cfe-commits mailing list