summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2017-01-10 19:51:17 +0000
committerPetr Hosek <phosek@chromium.org>2017-01-10 19:51:17 +0000
commit1612f8c4208f8f7d235125c54fe27dc2b1dbc2e1 (patch)
treee6afc1e9e3e73fc3176e1a2514af8095da3e9300
parent7a0838b9b6bb87e2398127e348436f0238a6e242 (diff)
downloadbcm5719-llvm-1612f8c4208f8f7d235125c54fe27dc2b1dbc2e1.tar.gz
bcm5719-llvm-1612f8c4208f8f7d235125c54fe27dc2b1dbc2e1.zip
[CMake][libcxx] Move Python check to main CMake file
This is to make sure this check is called even when building as part of LLVM runtimes when we are doing standalone but not out of tree build. Differential Revision: https://reviews.llvm.org/D28392 llvm-svn: 291592
-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 9fa0ed37e58..ae0cf7e4b2b 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 7fee839d273..ee0f3182e54 100644
--- a/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ b/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -95,13 +95,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