[llvm] 6b954f1 - [KillTheDoctor/CMake] Add missing keyword PRIVATE in target_link_libraries

Raul Tambre via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 06:09:03 PDT 2020


Author: Daniel Muñoz
Date: 2020-09-07T16:08:55+03:00
New Revision: 6b954f1b79605e4139157ce064fe695c86a0f06a

URL: https://github.com/llvm/llvm-project/commit/6b954f1b79605e4139157ce064fe695c86a0f06a
DIFF: https://github.com/llvm/llvm-project/commit/6b954f1b79605e4139157ce064fe695c86a0f06a.diff

LOG: [KillTheDoctor/CMake] Add missing keyword PRIVATE in target_link_libraries

Add PRIVATE keyword in target_link_libraries to prevent CMake Error on Windows.

While trying to compile llvm/clang on Windows, the following CMake error occurred. The reason is a missing PUBLIC/PRIVATE/INTERFACE keyword in target_link_libraries.

`
CMake Error at utils/KillTheDoctor/CMakeLists.txt:5 (target_link_libraries):
  The keyword signature for target_link_libraries has already been used with
  the target "KillTheDoctor".  All uses of target_link_libraries with a
  target must be either all-keyword or all-plain.

  The uses of the keyword signature are here:

   * cmake/modules/AddLLVM.cmake:771 (target_link_libraries)
`

Reviewed By: tambre

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

Added: 
    

Modified: 
    llvm/utils/KillTheDoctor/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/utils/KillTheDoctor/CMakeLists.txt b/llvm/utils/KillTheDoctor/CMakeLists.txt
index 72d994fb9953..53b90b820424 100644
--- a/llvm/utils/KillTheDoctor/CMakeLists.txt
+++ b/llvm/utils/KillTheDoctor/CMakeLists.txt
@@ -3,6 +3,7 @@ add_llvm_utility(KillTheDoctor
   )
 
 target_link_libraries(KillTheDoctor
+  PRIVATE
   LLVMSupport
   psapi
   )


        


More information about the llvm-commits mailing list