[PATCH] D27643: [libcxx][CMake] Move the warning to HandleOutOfTreeLLVM

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 16:59:36 PST 2016


phosek created this revision.
phosek added reviewers: EricWF, beanz.
phosek added a subscriber: llvm-commits.
phosek set the repository for this revision to rL LLVM.
Herald added a subscriber: mgorny.

This currently gives a warning when building libcxx under runtimes. When building as part of runtimes,  the value of `CMAKE_SOURCE_DIR` is different from `CMAKE_CURRENT_SOURCE_DIR`, but runtimes build sets `${runtime}_STANDALONE_BUILD` to 1 which triggers this warning. This was introduced by r286789.


Repository:
  rL LLVM

https://reviews.llvm.org/D27643

Files:
  CMakeLists.txt
  cmake/Modules/HandleOutOfTreeLLVM.cmake


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27643.80980.patch
Type: text/x-patch
Size: 1286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161210/0e96bbe0/attachment.bin>


More information about the llvm-commits mailing list