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)
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)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits