Author: phosek Date: Tue Jan 10 13:51:17 2017 New Revision: 291592 URL: http://llvm.org/viewvc/llvm-project?rev=291592&view=rev Log: [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 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=291592&r1=291591&r2=291592&view=diff ============================================================================== --- libcxx/trunk/CMakeLists.txt (original) +++ libcxx/trunk/CMakeLists.txt Tue Jan 10 13:51:17 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=291592&r1=291591&r2=291592&view=diff ============================================================================== --- libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake (original) +++ libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake Tue Jan 10 13:51:17 2017 @@ -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() _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits