Index: libcxx/trunk/CMakeLists.txt =================================================================== --- libcxx/trunk/CMakeLists.txt +++ libcxx/trunk/CMakeLists.txt @@ -32,6 +32,15 @@ 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( Index: libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake =================================================================== --- libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake +++ libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake @@ -95,13 +95,6 @@ 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()