mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-26 13:10:42 +00:00
utils/llvm-build: Add trivial quoting of slashes for CMake fragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143781 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
38f5c0da6d
commit
57574fa35e
@ -7,6 +7,19 @@ from util import *
|
||||
|
||||
###
|
||||
|
||||
def cmake_quote_string(value):
|
||||
"""
|
||||
cmake_quote_string(value) -> str
|
||||
|
||||
Return a quoted form of the given value that is suitable for use in CMake
|
||||
language files.
|
||||
"""
|
||||
|
||||
# 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
|
||||
@ -388,8 +401,9 @@ class LLVMProjectInfo(object):
|
||||
for dep in dependencies:
|
||||
print >>f, """\
|
||||
configure_file(\"%s\"
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)""" % (dep,)
|
||||
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DummyConfigureOutput)""" % (
|
||||
cmake_quote_string(dep),)
|
||||
|
||||
f.close()
|
||||
|
||||
def write_make_fragment(self, output_path):
|
||||
|
Loading…
Reference in New Issue
Block a user