summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2014-08-16 01:35:36 +0000
committerEric Fiselier <eric@efcs.ca>2014-08-16 01:35:36 +0000
commit1b44db22c6e378080539a35ce1fd1f9b1f85c9b1 (patch)
tree7522d6c4739bed118acc72ae2af43266e8219944 /libcxx/cmake
parent781a7b04f2557dc5e971f203bd5b681b866dfb45 (diff)
downloadbcm5719-llvm-1b44db22c6e378080539a35ce1fd1f9b1f85c9b1.tar.gz
bcm5719-llvm-1b44db22c6e378080539a35ce1fd1f9b1f85c9b1.zip
[libcxx] Update the way the -std= flag is chosen by CMake and LibcxxTestFormat
Summary: This patch does two things: CMake Update: - Add compiler flag checks for -std=c++11 and -std=c++1y and remove check for -std=c++0x. - Add configuration option LIBCXX_ENABLE_CXX1Y to prevent/allow -std=c++1y from being chosen as the std version. LIBCXX_ENABLE_CXX1Y is set to OFF by default. - if LIBCXX_ENABLE_CXX1Y is enabled then set LIBCXX_STD_VERSION to c++1y and fail if the compiler does not support -std=c++1y - If c++1y is not enabled then use c++11 and fail if the compiler does not support c++11. Lit Update: - Update lit.site.cfg.in to capture LIBCXX_STD_VERSION information as config.std. - Remove mentions of has_cxx0X configuration option. - Check for `--param std=X' passed to lit on the command line. - Choose the std for the tests either from command line parameter or (if it doesn't exist) the lit.site.cfg. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: emaste, rnk, ajwong, danalbert, cfe-commits Differential Revision: http://reviews.llvm.org/D4329 llvm-svn: 215802
Diffstat (limited to 'libcxx/cmake')
-rw-r--r--libcxx/cmake/config-ix.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/cmake/config-ix.cmake b/libcxx/cmake/config-ix.cmake
index e8adafd6587..6aa4fa2da75 100644
--- a/libcxx/cmake/config-ix.cmake
+++ b/libcxx/cmake/config-ix.cmake
@@ -2,7 +2,8 @@ include(CheckLibraryExists)
include(CheckCXXCompilerFlag)
# Check compiler flags
-check_cxx_compiler_flag(-std=c++0x LIBCXX_HAS_STDCXX0X_FLAG)
+check_cxx_compiler_flag(-std=c++11 LIBCXX_HAS_STDCXX11_FLAG)
+check_cxx_compiler_flag(-std=c++1y LIBCXX_HAS_STDCXX1Y_FLAG)
check_cxx_compiler_flag(-fPIC LIBCXX_HAS_FPIC_FLAG)
check_cxx_compiler_flag(-nodefaultlibs LIBCXX_HAS_NODEFAULTLIBS_FLAG)
check_cxx_compiler_flag(-nostdinc++ LIBCXX_HAS_NOSTDINCXX_FLAG)
OpenPOWER on IntegriCloud