[llvm] r242120 - [CMake] Unbreak add_llvm_external_project when external projects are specified.
NAKAMURA Takumi
geek4civic at gmail.com
Mon Jul 13 22:12:54 PDT 2015
Author: chapuni
Date: Tue Jul 14 00:12:53 2015
New Revision: 242120
URL: http://llvm.org/viewvc/llvm-project?rev=242120&view=rev
Log:
[CMake] Unbreak add_llvm_external_project when external projects are specified.
LLVM_EXTERNAL_*_SOURCE_DIR is reset as PATH with set(CACHE PATH).
Then the CACHE PATH variable, LLVM_EXTERNAL_*_SOURCE_DIR, is normalized as
${CMAKE_SOURCE_DIR}/${path_var} if ${path_var} is relative.
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=242120&r1=242119&r2=242120&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Tue Jul 14 00:12:53 2015
@@ -696,6 +696,9 @@ macro(add_llvm_external_project name)
endif()
if(NOT LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR)
set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${add_llvm_external_dir}")
+ else()
+ set(LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR
+ CACHE PATH "Path to ${name} source directory")
endif()
if (EXISTS ${LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR}/CMakeLists.txt)
option(LLVM_EXTERNAL_${nameUPPER}_BUILD
More information about the llvm-commits
mailing list