[libcxx] r292084 - Reland "[CMake][libcxx] Move Python check to main CMake file"

Petr Hosek via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 15 16:33:08 PST 2017


Author: phosek
Date: Sun Jan 15 18:33:07 2017
New Revision: 292084

URL: http://llvm.org/viewvc/llvm-project?rev=292084&view=rev
Log:
Reland "[CMake][libcxx] Move Python check to main CMake file"

This relands commit r291728.

Modified:
    libcxx/trunk/CMakeLists.txt
    libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake

Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=292084&r1=292083&r2=292084&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Sun Jan 15 18:33:07 2017
@@ -32,6 +32,15 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
   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(

Modified: libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake?rev=292084&r1=292083&r2=292084&view=diff
==============================================================================
--- libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake (original)
+++ libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake Sun Jan 15 18:33:07 2017
@@ -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()




More information about the cfe-commits mailing list