diff options
author | Kim Grasman <kim.grasman@gmail.com> | 2017-12-10 11:23:41 +0100 |
---|---|---|
committer | Kim Gräsman <kim.grasman@gmail.com> | 2017-12-10 12:09:21 +0100 |
commit | c6e4125389d769638c27231834c4758680b7c747 (patch) | |
tree | a3cb373d5f33a44ad15102d59ea4c9d6943ce854 | |
parent | c182d6a45e9ddc3a977c946e5873260fffed7351 (diff) |
Use PRIVATE in target_link_libraries
LLVM introduced PRIVATE scope for target_link_libraries for executables
in r319840. Since executables don't export link dependencies, this makes
sense.
CMake does not allow mixing target_link_libraries invocations
with/without scope specifiers, so add PRIVATE in IWYU's CMakeLists.txt
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7aad3bd..67c4abb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,7 @@ endif() # Clang dependencies. target_link_libraries(include-what-you-use + PRIVATE clangFrontend clangSerialization clangDriver @@ -139,6 +140,7 @@ target_link_libraries(include-what-you-use # LLVM dependencies. target_link_libraries(include-what-you-use + PRIVATE LLVMX86AsmParser # MC, MCParser, Support, X86CodeGen, X86Desc, X86Info LLVMX86CodeGen # Analysis, AsmPrinter, CodeGen, Core, MC, Support, Target, # X86AsmPrinter, X86Desc, X86Info, X86Utils @@ -169,6 +171,7 @@ target_link_libraries(include-what-you-use # Platform dependencies. if( WIN32 ) target_link_libraries(include-what-you-use + PRIVATE shlwapi version # For clangDriver's MSVCToolchain ) @@ -177,6 +180,7 @@ elseif( UNIX ) include(FindBacktrace) target_link_libraries(include-what-you-use + PRIVATE pthread z ${Backtrace_LIBRARIES} |