CMake build system: support for parallel builds.
[oota-llvm.git] / cmake / modules / AddLLVM.cmake
index c3641eacd22d2b71c5dff9cb489f82f7cfa6b42b..fc917d324a3e3a9c094ef69107148aa19df8a54a 100755 (executable)
@@ -3,6 +3,10 @@ include(LLVMConfig)
 macro(add_llvm_library name)
   add_library( ${name} ${ARGN} )
   set( llvm_libs ${llvm_libs} ${name} PARENT_SCOPE)
+  set( llvm_lib_targets ${llvm_lib_targets} ${name} PARENT_SCOPE )
+  if( LLVM_COMMON_DEPENDS )
+    add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
+  endif( LLVM_COMMON_DEPENDS )
 endmacro(add_llvm_library name)