فهرست منبع

Revert "[CMake][libcxx] Move Python check to main CMake file"

This reverts commit 39441fe9f00a58ffc2fdff92a4b0e8a280a5f444.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291728 91177308-0d34-0410-b5e6-96231b3b80d8
Petr Hosek 8 سال پیش
والد
کامیت
0758410191
2فایلهای تغییر یافته به همراه7 افزوده شده و 9 حذف شده
  1. 0 9
      CMakeLists.txt
  2. 7 0
      cmake/Modules/HandleOutOfTreeLLVM.cmake

+ 0 - 9
CMakeLists.txt

@@ -32,15 +32,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   include(HandleOutOfTreeLLVM)
   include(HandleOutOfTreeLLVM)
 endif()
 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.
 # Require out of source build.
 include(MacroEnsureOutOfSourceBuild)
 include(MacroEnsureOutOfSourceBuild)
 MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
 MACRO_ENSURE_OUT_OF_SOURCE_BUILD(

+ 7 - 0
cmake/Modules/HandleOutOfTreeLLVM.cmake

@@ -95,6 +95,13 @@ macro(configure_out_of_tree_llvm)
   endif()
   endif()
 
 
   # LLVM Options --------------------------------------------------------------
   # 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)
   if (NOT DEFINED LLVM_INCLUDE_TESTS)
     set(LLVM_INCLUDE_TESTS ${LLVM_FOUND})
     set(LLVM_INCLUDE_TESTS ${LLVM_FOUND})
   endif()
   endif()