[flang-commits] [flang] 524ceec - [flang] Add Clang CMake modules path for Decimal library

Jonathon Penix via flang-commits flang-commits at lists.llvm.org
Thu Apr 27 11:06:08 PDT 2023


Author: Jonathon Penix
Date: 2023-04-27T11:05:28-07:00
New Revision: 524ceecd89bb7bea79155fdcb5b67dbcd141e614

URL: https://github.com/llvm/llvm-project/commit/524ceecd89bb7bea79155fdcb5b67dbcd141e614
DIFF: https://github.com/llvm/llvm-project/commit/524ceecd89bb7bea79155fdcb5b67dbcd141e614.diff

LOG: [flang] Add Clang CMake modules path for Decimal library

This fixes an error that clang_target_link_libraries is unknown
when building the Decimal library standalone--this is the same
as D149090, just for the Decimal library (vs the runtime).

I was still seeing this error for the Decimal library and didn't
see a corresponding patch--apologies in advance if I missed one
or if this is a duplicate!

Differential Revision: https://reviews.llvm.org/D149277

Added: 
    

Modified: 
    flang/lib/Decimal/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/flang/lib/Decimal/CMakeLists.txt b/flang/lib/Decimal/CMakeLists.txt
index 5c5a498f1a3ca..a81d329b4a5de 100644
--- a/flang/lib/Decimal/CMakeLists.txt
+++ b/flang/lib/Decimal/CMakeLists.txt
@@ -11,6 +11,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
 
   set(LLVM_COMMON_CMAKE_UTILS "${FLANG_SOURCE_DIR}/../cmake")
   set(LLVM_CMAKE_UTILS "${FLANG_SOURCE_DIR}/../llvm/cmake")
+  set(CLANG_CMAKE_UTILS "${FLANG_SOURCE_DIR}/../clang/cmake")
 
   # Add path for custom modules
   list(INSERT CMAKE_MODULE_PATH 0
@@ -20,8 +21,10 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
     "${LLVM_COMMON_CMAKE_UTILS}/Modules"
     "${LLVM_CMAKE_UTILS}"
     "${LLVM_CMAKE_UTILS}/modules"
+    "${CLANG_CMAKE_UTILS}/modules"
     )
 
+  include(AddClang)
   include(AddLLVM)
   include(AddFlang)
   include(HandleLLVMOptions)


        


More information about the flang-commits mailing list