[PATCH] D16964: Make sure the projects subdirectory doesn't contain the clang or clang-tools-extra projects
don hinton via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 7 08:01:59 PST 2016
hintonda created this revision.
hintonda added reviewers: beanz, mclow.lists.
hintonda added a subscriber: cfe-commits.
A common error for new users it to checkout subprojects, like clang or clang-tools-extra, into the wrong subdirectory. This change helps prevent this, since the resulting build would otherwise be unusable.
http://reviews.llvm.org/D16964
Files:
projects/CMakeLists.txt
Index: projects/CMakeLists.txt
===================================================================
--- projects/CMakeLists.txt
+++ projects/CMakeLists.txt
@@ -4,6 +4,14 @@
file(GLOB entries *)
foreach(entry ${entries})
if(IS_DIRECTORY ${entry} AND EXISTS ${entry}/CMakeLists.txt)
+ # Do not allow tools like clang or clang-tools-extra in the projects directory
+ if(${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/clang)
+ message(FATAL_ERROR "clang must be placed under llvm/tools, not llvm/projects")
+ endif()
+ if((${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/extra) OR
+ (${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/clang-tools-extra))
+ message(FATAL_ERROR "clang-tools-extra (extra) must be placed under llvm/tools/clang/tools, not llvm/projects")
+ endif()
if((NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/compiler-rt) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/dragonegg) AND
(NOT ${entry} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}/libcxx) AND
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16964.47132.patch
Type: text/x-patch
Size: 1023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160207/e4f4a613/attachment.bin>
More information about the cfe-commits
mailing list