summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-03-29 20:51:00 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-03-29 20:51:00 +0000
commitfb767c8c37478e96adcf9a0e02f403d0e1cf0647 (patch)
tree3deffea150ea77a077f70a404bd8a25b56cf41a8 /CMakeLists.txt
parentbc52032c0e41e2688094a59539ff7d9d7db2e34e (diff)
CMake: removed some unnecesary conditionals from add_clang_library.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt21
1 files changed, 6 insertions, 15 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a56d07488d..bc63cf8f66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -171,21 +171,12 @@ macro(add_clang_library name)
if( LLVM_COMMON_DEPENDS )
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
endif( LLVM_COMMON_DEPENDS )
- if( LLVM_USED_LIBS )
- foreach(lib ${LLVM_USED_LIBS})
- target_link_libraries( ${name} ${lib} )
- endforeach(lib)
- endif( LLVM_USED_LIBS )
- if( LLVM_LINK_COMPONENTS )
- llvm_config(${name} ${LLVM_LINK_COMPONENTS})
- endif( LLVM_LINK_COMPONENTS )
- if (LLVM_COMMON_LIBS)
- target_link_libraries(${name} ${LLVM_COMMON_LIBS})
- endif()
- get_system_libs(llvm_system_libs)
- if( llvm_system_libs )
- target_link_libraries(${name} ${llvm_system_libs})
- endif()
+
+ target_link_libraries( ${name} ${LLVM_USED_LIBS} )
+ llvm_config( ${name} ${LLVM_LINK_COMPONENTS} )
+ target_link_libraries( ${name} ${LLVM_COMMON_LIBS} )
+ link_system_libs( ${name} )
+
add_dependencies(${name} ClangDiagnosticCommon)
if(MSVC)
get_target_property(cflag ${name} COMPILE_FLAGS)