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 | 3508e7a87750fe8ff30d44a9154e36509b0ceb8f (patch) | |
tree | c4c41b7868dec24721a1dcbe5f254da9614ae670 /CMakeLists.txt | |
parent | f620d224b7415be8056a8850824c49ebfa69673c (diff) |
Reland "[CMake][libcxx] Move Python check to main CMake file"
This relands commit r291728.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 652e94585..ed66930ea 100644 --- a/CMakeLists.txt +++ b/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( |