aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-17 01:19:53 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-17 01:19:53 +0000
commitd5889d8c7fcd97994cf38bb7469a703fe3db3672 (patch)
tree79d51f0d7ab6912284c93a5cafbf92297859b4a2 /utils
parent3bdb3c9b511b89d38696587d61b82949e06a7729 (diff)
llvm-build: Attempt to work around a CMake Makefile generator bug that doesn't
properly quote strings when writing the CMakeFiles/Makefile.cmake output file (which lists the dependencies). This shows up when using CMake + MSYS Makefile generator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/llvm-build/llvmbuild/main.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py
index fa76aa5d8e..21cf392882 100644
--- a/utils/llvm-build/llvmbuild/main.py
+++ b/utils/llvm-build/llvmbuild/main.py
@@ -21,6 +21,21 @@ def cmake_quote_string(value):
return value
+def cmake_quote_path(value):
+ """
+ cmake_quote_path(value) -> str
+
+ Return a quoted form of the given value that is suitable for use in CMake
+ language files.
+ """
+
+ # CMake has a bug in it's Makefile generator that doesn't properly quote
+ # strings it generates. So instead of using proper quoting, we just use "/"
+ # style paths. Currently, we only handle escaping backslashes.
+ value = value.replace("\\", "/")
+
+ return value
+
def mk_quote_string_for_target(value):
"""
mk_quote_string_for_target(target_name) -> str
@@ -430,7 +445,7 @@ class LLVMProjectInfo(object):
print >>f, """\
configure_file(\"%s\"
${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)""" % (
- cmake_quote_string(dep),)
+ cmake_quote_path(dep),)
f.close()