Fix add_llvm_external_project.
authorManuel Klimek <klimek@google.com>
Thu, 22 Oct 2015 08:31:46 +0000 (08:31 +0000)
committerManuel Klimek <klimek@google.com>
Thu, 22 Oct 2015 08:31:46 +0000 (08:31 +0000)
r250835 unintentionally discarded the optional parameter to the
add_llvm_external_project() macro that may point to a path when the said
path is different from ${name}. This should fix it by passing ${ARGN} on
to add_llvm_subdirectory(). The problem manifests itself with e.g.
add_llvm_external_project(clang-tools-extra extra) from
clang/tools/CMakeLists.txt

Patch by Luchesar V. Iliev.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251001 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddLLVM.cmake

index 84f3216d6bc45cd73ef59827da28472f056c6a16..c3e1679bdb5dfca444c33101a079bb94ec010358 100644 (file)
@@ -781,7 +781,7 @@ endmacro()
 # enable or disable building it with everything else.
 # Additional parameter can be specified as the name of directory.
 macro(add_llvm_external_project name)
 # enable or disable building it with everything else.
 # Additional parameter can be specified as the name of directory.
 macro(add_llvm_external_project name)
-  add_llvm_subdirectory(LLVM TOOL ${name})
+  add_llvm_subdirectory(LLVM TOOL ${name} ${ARGN})
 endmacro()
 
 macro(add_llvm_tool_subdirectory name)
 endmacro()
 
 macro(add_llvm_tool_subdirectory name)