[KillTheDoctor/CMake] Add missing keyword PRIVATE in target_link_libraries
authorDaniel Muñoz <danyable@gmail.com>
Mon, 7 Sep 2020 13:00:31 +0000 (16:00 +0300)
committerRaul Tambre <raul.tambre@cleveron.com>
Mon, 7 Sep 2020 13:08:55 +0000 (16:08 +0300)
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

llvm/utils/KillTheDoctor/CMakeLists.txt

index 72d994f..53b90b8 100644 (file)
@@ -3,6 +3,7 @@ add_llvm_utility(KillTheDoctor
   )
 
 target_link_libraries(KillTheDoctor
+  PRIVATE
   LLVMSupport
   psapi
   )