The same we do every commit, Pinky: Try to fix the windows build (after r198136).
authorNico Weber <nicolasweber@gmx.de>
Sun, 29 Dec 2013 04:05:23 +0000 (04:05 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sun, 29 Dec 2013 04:05:23 +0000 (04:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198148 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddLLVM.cmake

index 4238f52e41d8f367d36d0f0089eca47463fd1165..681bbe899bedc8da3ded3a6bb3cd9af9bbb161c2 100644 (file)
@@ -35,9 +35,12 @@ function(add_llvm_symbol_exports target_name export_file)
       set(CAT "cat")
     endif()
 
+    # Using ${export_file} in add_custom_command directly confuses cmd.exe.
+    file(TO_NATIVE_PATH ${export_file} export_file_backslashes)
+
     add_custom_command(OUTPUT symbol.def
       COMMAND ${CMAKE_COMMAND} -E echo "EXPORTS" > symbol.def
-      COMMAND ${CAT} "\"${export_file}\"" >> symbol.def
+      COMMAND ${CAT} ${export_file_backslashes} >> symbol.def
       DEPENDS ${export_file}
       VERBATIM
       COMMENT "Creating export file for ${target_name}")