From 3508e7a87750fe8ff30d44a9154e36509b0ceb8f Mon Sep 17 00:00:00 2001 From: Petr Hosek Date: Mon, 16 Jan 2017 00:33:07 +0000 Subject: 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 --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CMakeLists.txt') 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( -- cgit v1.2.3