[PATCH] D40934: [cmake] Only pass CMAKE_SYSROOT if non-empty
Shoaib Meenai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 8 11:43:24 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL320183: [cmake] Only pass CMAKE_SYSROOT if non-empty (authored by smeenai).
Repository:
rL LLVM
https://reviews.llvm.org/D40934
Files:
llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
Index: llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/trunk/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -132,6 +132,10 @@
set(exclude EXCLUDE_FROM_ALL 1)
endif()
+ if(CMAKE_SYSROOT)
+ set(sysroot_arg -DCMAKE_SYSROOT=${CMAKE_SYSROOT})
+ endif()
+
ExternalProject_Add(${name}
DEPENDS ${ARG_DEPENDS} llvm-config
${name}-clobber
@@ -143,7 +147,7 @@
CMAKE_ARGS ${${nameCanon}_CMAKE_ARGS}
${compiler_args}
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
- -DCMAKE_SYSROOT=${CMAKE_SYSROOT}
+ ${sysroot_arg}
-DLLVM_BINARY_DIR=${PROJECT_BINARY_DIR}
-DLLVM_CONFIG_PATH=$<TARGET_FILE:llvm-config>
-DLLVM_ENABLE_WERROR=${LLVM_ENABLE_WERROR}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40934.126190.patch
Type: text/x-patch
Size: 919 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171208/51b936e5/attachment.bin>
More information about the llvm-commits
mailing list