steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, mgorny.
This requirement to check it out in a directory called 'extra' was never documented for git users, so git users doing the obvious thing (just clone, don't specify a name) will silently not get clang-tools-extra built. Even reading the code is confusing because the `add_llvm_external_project` macro appears to be used in place of the `add_subdirectory` command, though the latter treats the second placement argument as just a build directory name. So, anyone assuming the same semantic with `add_llvm_external_project` would be confused. Repository: rC Clang https://reviews.llvm.org/D52819 Files: tools/CMakeLists.txt www/get_started.html Index: www/get_started.html =================================================================== --- www/get_started.html +++ www/get_started.html @@ -66,7 +66,7 @@ <ul> <li><tt>cd llvm/tools/clang/tools</tt></li> <li><tt>svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk - extra</tt></li> + clang-tools-extra</tt></li> <li><tt>cd ../../../..</tt></li> </ul> </li> Index: tools/CMakeLists.txt =================================================================== --- tools/CMakeLists.txt +++ tools/CMakeLists.txt @@ -26,12 +26,17 @@ add_clang_subdirectory(scan-view) endif() -# We support checking out the clang-tools-extra repository into the 'extra' -# subdirectory. It contains tools developed as part of the Clang/LLVM project -# on top of the Clang tooling platform. We keep them in a separate repository -# to keep the primary Clang repository small and focused. -# It also may be included by LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR. -add_llvm_external_project(clang-tools-extra extra) +if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extra) + + # Documentation for working with SVN used to recommend using + # the name 'extra'. Support that for now as backwards + # compatibility + message(DEPRECATION "Checking out clang-tools-extra into a directory called 'extra' is deprecated. +Rename the directory to 'clang-tools-extra' instead.") + add_llvm_external_project(clang-tools-extra extra) +else() + add_llvm_external_project(clang-tools-extra) +endif() # libclang may require clang-tidy in clang-tools-extra. add_clang_subdirectory(libclang)
Index: www/get_started.html =================================================================== --- www/get_started.html +++ www/get_started.html @@ -66,7 +66,7 @@ <ul> <li><tt>cd llvm/tools/clang/tools</tt></li> <li><tt>svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk - extra</tt></li> + clang-tools-extra</tt></li> <li><tt>cd ../../../..</tt></li> </ul> </li> Index: tools/CMakeLists.txt =================================================================== --- tools/CMakeLists.txt +++ tools/CMakeLists.txt @@ -26,12 +26,17 @@ add_clang_subdirectory(scan-view) endif() -# We support checking out the clang-tools-extra repository into the 'extra' -# subdirectory. It contains tools developed as part of the Clang/LLVM project -# on top of the Clang tooling platform. We keep them in a separate repository -# to keep the primary Clang repository small and focused. -# It also may be included by LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR. -add_llvm_external_project(clang-tools-extra extra) +if (IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/extra) + + # Documentation for working with SVN used to recommend using + # the name 'extra'. Support that for now as backwards + # compatibility + message(DEPRECATION "Checking out clang-tools-extra into a directory called 'extra' is deprecated. +Rename the directory to 'clang-tools-extra' instead.") + add_llvm_external_project(clang-tools-extra extra) +else() + add_llvm_external_project(clang-tools-extra) +endif() # libclang may require clang-tidy in clang-tools-extra. add_clang_subdirectory(libclang)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits