[libcxx][CMake] Move the warning to HandleOutOfTreeLLVM
authorPetr Hosek <phosek@chromium.org>
Mon, 12 Dec 2016 05:05:46 +0000 (05:05 +0000)
committerPetr Hosek <phosek@chromium.org>
Mon, 12 Dec 2016 05:05:46 +0000 (05:05 +0000)
This currently gives a warning when building libcxx under runtimes.

Differential Revision: https://reviews.llvm.org/D27643

llvm-svn: 289418

libcxx/CMakeLists.txt
libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake

index ee95a2d..658221e 100644 (file)
@@ -32,13 +32,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   include(HandleOutOfTreeLLVM)
 endif()
 
-if (LIBCXX_STANDALONE_BUILD AND NOT LLVM_FOUND)
-  message(WARNING "UNSUPPORTED LIBCXX CONFIGURATION DETECTED: "
-                  "llvm-config not found and LLVM_PATH not defined.\n"
-                  "Reconfigure with -DLLVM_CONFIG_PATH=path/to/llvm-config "
-                  "or -DLLVM_PATH=path/to/llvm-source-root.")
-endif()
-
 # Require out of source build.
 include(MacroEnsureOutOfSourceBuild)
 MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
index 599d8a1..c772143 100644 (file)
@@ -41,6 +41,10 @@ macro(find_llvm_parts)
     set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
   else()
     set(LLVM_FOUND OFF)
+    message(WARNING "UNSUPPORTED LIBCXX CONFIGURATION DETECTED: "
+                    "llvm-config not found and LLVM_PATH not defined.\n"
+                    "Reconfigure with -DLLVM_CONFIG_PATH=path/to/llvm-config "
+                    "or -DLLVM_PATH=path/to/llvm-source-root.")
     return()
   endif()