diff options
author | Petr Hosek <phosek@chromium.org> | 2017-01-16 00:33:07 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-01-16 00:33:07 +0000 |
commit | daf3a694604a96933853092506a88af85bbe73c9 (patch) | |
tree | 7d800d3d48e8332f2e24a82f4a915764462e95bf /libcxx | |
parent | 783426884d5f1879ec6bd31b8cf9e8be24d0bba8 (diff) | |
download | bcm5719-llvm-daf3a694604a96933853092506a88af85bbe73c9.tar.gz bcm5719-llvm-daf3a694604a96933853092506a88af85bbe73c9.zip |
Reland "[CMake][libcxx] Move Python check to main CMake file"
This relands commit r291728.
llvm-svn: 292084
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/CMakeLists.txt | 9 | ||||
-rw-r--r-- | libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake | 7 |
2 files changed, 9 insertions, 7 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 652e945856d..ed66930ea25 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -32,6 +32,15 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) include(HandleOutOfTreeLLVM) endif() +if (LIBCXX_STANDALONE_BUILD) + include(FindPythonInterp) + if( NOT PYTHONINTERP_FOUND ) + message(WARNING "Failed to find python interpreter. " + "The libc++ test suite will be disabled.") + set(LLVM_INCLUDE_TESTS OFF) + endif() +endif() + # Require out of source build. include(MacroEnsureOutOfSourceBuild) MACRO_ENSURE_OUT_OF_SOURCE_BUILD( diff --git a/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake b/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake index 34dbcb75376..879882dcfea 100644 --- a/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake +++ b/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake @@ -96,13 +96,6 @@ macro(configure_out_of_tree_llvm) endif() # LLVM Options -------------------------------------------------------------- - include(FindPythonInterp) - if( NOT PYTHONINTERP_FOUND ) - message(WARNING "Failed to find python interpreter. " - "The libc++ test suite will be disabled.") - set(LLVM_INCLUDE_TESTS OFF) - endif() - if (NOT DEFINED LLVM_INCLUDE_TESTS) set(LLVM_INCLUDE_TESTS ${LLVM_FOUND}) endif() |