[PATCH] D25093: [libcxx] [cmake] Allow testing against installed LLVM with no sources
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 05:43:43 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL284583: [cmake] Allow testing against installed LLVM with no sources (authored by mgorny).
Changed prior to commit:
https://reviews.llvm.org/D25093?vs=73048&id=75132#toc
Repository:
rL LLVM
https://reviews.llvm.org/D25093
Files:
libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake
Index: libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake
===================================================================
--- libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake
+++ libcxx/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake
@@ -43,21 +43,16 @@
return()
endif()
- if (NOT EXISTS ${LLVM_MAIN_SRC_DIR})
- set(LLVM_FOUND OFF)
- message(WARNING "Not found: ${LLVM_MAIN_SRC_DIR}")
- return()
- endif()
-
- if(NOT EXISTS ${LLVM_CMAKE_PATH})
+ if (EXISTS "${LLVM_CMAKE_PATH}")
+ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
+ elseif (EXISTS "${LLVM_MAIN_SRC_DIR}/cmake/modules")
+ list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")
+ else()
set(LLVM_FOUND OFF)
- message(WARNING "Not found: ${LLVM_CMAKE_PATH}")
+ message(WARNING "Neither ${LLVM_CMAKE_PATH} nor ${LLVM_MAIN_SRC_DIR}/cmake/modules found")
return()
endif()
- list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
- list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")
-
set(LLVM_FOUND ON)
endmacro(find_llvm_parts)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25093.75132.patch
Type: text/x-patch
Size: 1087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161019/65ada8ed/attachment-0001.bin>
More information about the cfe-commits
mailing list