diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-11-17 01:19:53 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-11-17 01:19:53 +0000 |
commit | 52f71220d57e418f0dd58289762146e41b0da6b8 (patch) | |
tree | 755ae6b4372b2b53b66c54b1b7491168bce54ecd /llvm/utils/llvm-build/llvmbuild/main.py | |
parent | ce619ddfc5446dbd51f134f7ddb8acc71f8bb83d (diff) | |
download | bcm5719-llvm-52f71220d57e418f0dd58289762146e41b0da6b8.tar.gz bcm5719-llvm-52f71220d57e418f0dd58289762146e41b0da6b8.zip |
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.
llvm-svn: 144873
Diffstat (limited to 'llvm/utils/llvm-build/llvmbuild/main.py')
-rw-r--r-- | llvm/utils/llvm-build/llvmbuild/main.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/llvm/utils/llvm-build/llvmbuild/main.py b/llvm/utils/llvm-build/llvmbuild/main.py index fa76aa5d8ed..21cf3928829 100644 --- a/llvm/utils/llvm-build/llvmbuild/main.py +++ b/llvm/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() |