summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-01-16 00:33:07 +0000
committerPetr Hosek <phosek@chromium.org>2017-01-16 00:33:07 +0000
commitdaf3a694604a96933853092506a88af85bbe73c9 (patch)
tree7d800d3d48e8332f2e24a82f4a915764462e95bf /libcxx
parent783426884d5f1879ec6bd31b8cf9e8be24d0bba8 (diff)
downloadbcm5719-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.txt9
-rw-r--r--libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake7
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()
OpenPOWER on IntegriCloud