[PATCH] D88157: [CMake] Make sure _cmake_system_name gets set

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 10:42:23 PDT 2020


daltenty updated this revision to Diff 293797.
daltenty added a comment.

- Update comment


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88157/new/

https://reviews.llvm.org/D88157

Files:
  llvm/cmake/modules/LLVMExternalProjectUtils.cmake


Index: llvm/cmake/modules/LLVMExternalProjectUtils.cmake
===================================================================
--- llvm/cmake/modules/LLVMExternalProjectUtils.cmake
+++ llvm/cmake/modules/LLVMExternalProjectUtils.cmake
@@ -52,6 +52,12 @@
     endif()
   endforeach()
 
+  # If CMAKE_SYSTEM_NAME is not set explicitly in the arguments passed to us, 
+  # reflect CMake's own default.
+  if (NOT _cmake_system_name)
+    set(_cmake_system_name "${CMAKE_HOST_SYSTEM_NAME}")
+  endif()
+
   if(NOT ARG_TOOLCHAIN_TOOLS)
     set(ARG_TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objdump)
     if(_cmake_system_name STREQUAL Darwin)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88157.293797.patch
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200923/ca3a8bb1/attachment.bin>


More information about the llvm-commits mailing list