CMake: Hopefully this will fix the build on VS. I can't replicate the
authorOscar Fuentes <ofv@wanadoo.es>
Sun, 16 Aug 2009 07:44:02 +0000 (07:44 +0000)
committerOscar Fuentes <ofv@wanadoo.es>
Sun, 16 Aug 2009 07:44:02 +0000 (07:44 +0000)
failure with VS 9.0, nmake and cmake 2.6.4. The buildbot output does
not show the patch level of cmake, it just says 2.6.

Sadly, parallel builds are broken due to recent changes on LLVM Target
libraries and its auxiliaries (TargetInfo, AsmPrinter, AsmParser). I
have a patch for stablishing the correct dependencies, but cmake is
buggy and generates makefiles that can't handle them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79180 91177308-0d34-0410-b5e6-96231b3b80d8

CMakeLists.txt
cmake/modules/AddLLVM.cmake

index 32dcae79f639db50e80d6ef15d48d04a80652e25..c8e86d0d3cb2514202a58bcf85bd7ce30101ee3d 100644 (file)
@@ -266,7 +266,6 @@ set(LLVM_ENUM_ASM_PRINTERS "")
 set(LLVM_ENUM_ASM_PARSERS "")
 foreach(t ${LLVM_TARGETS_TO_BUILD})
   message(STATUS "Targeting ${t}")
-  set(CURRENT_LLVM_TARGET ${t})
   add_subdirectory(lib/Target/${t})
   add_subdirectory(lib/Target/${t}/TargetInfo)
   if( EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Target/${t}/AsmPrinter/CMakeLists.txt )
index 597160326047ed4edfef89e6d8b5cd3a27771908..2c142dd2fd17f1eb533ad209c1713530a2e7a2e0 100755 (executable)
@@ -70,4 +70,5 @@ macro(add_llvm_target target_name)
   if ( TABLEGEN_OUTPUT )
     add_dependencies(LLVM${target_name} ${target_name}Table_gen)
   endif (TABLEGEN_OUTPUT)
+  set(CURRENT_LLVM_TARGET LLVM${target_name} PARENT_SCOPE)
 endmacro(add_llvm_target)