[compiler-rt] 0cf0bc7 - [compiler-rt] Don't redefine LLVM_COMMON_CMAKE_UTILS if it's defined (#66761)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 05:05:52 PDT 2023


Author: Xi Ruoyao
Date: 2023-10-04T14:05:48+02:00
New Revision: 0cf0bc7b45d54a528fe42f6524a2e0b49775a8d6

URL: https://github.com/llvm/llvm-project/commit/0cf0bc7b45d54a528fe42f6524a2e0b49775a8d6
DIFF: https://github.com/llvm/llvm-project/commit/0cf0bc7b45d54a528fe42f6524a2e0b49775a8d6.diff

LOG: [compiler-rt] Don't redefine LLVM_COMMON_CMAKE_UTILS if it's defined (#66761)

If we are building compiler-rt inside llvm-x.y.z.src directory, we
should not redefine LLVM_COMMON_CMAKE_UTILS.

Added: 
    

Modified: 
    compiler-rt/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt
index 514ac250075a8f2..1a46f5b33480694 100644
--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -5,7 +5,9 @@
 
 cmake_minimum_required(VERSION 3.20.0)
 
-set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
+if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
+  set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
+endif()
 include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
   NO_POLICY_SCOPE)
 


        


More information about the llvm-commits mailing list