summaryrefslogtreecommitdiff
path: root/tools/llvm-config
diff options
context:
space:
mode:
authorOscar Fuentes <ofv@wanadoo.es>2011-03-19 22:52:33 +0000
committerOscar Fuentes <ofv@wanadoo.es>2011-03-19 22:52:33 +0000
commitf6474f69d3c3298499a4767f445f928fb83cd4d3 (patch)
tree3266530343127c3aa8fed33c49364d9831231e5a /tools/llvm-config
parent930df9abc58323c1462163780e06d83621b3f1f0 (diff)
Make llvm-config.in configuration more MSYS-friendly.
Some of those POSIX <-> Windows command line conversions ended on failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-config')
-rw-r--r--tools/llvm-config/CMakeLists.txt19
1 files changed, 10 insertions, 9 deletions
diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
index 9e2d9693c51..dfbd986aafa 100644
--- a/tools/llvm-config/CMakeLists.txt
+++ b/tools/llvm-config/CMakeLists.txt
@@ -55,9 +55,9 @@ configure_file(
@ONLY
)
-set(LIBDEPS ${CMAKE_CURRENT_BINARY_DIR}/LibDeps.txt)
-set(LIBDEPS_TMP ${CMAKE_CURRENT_BINARY_DIR}/LibDeps.txt.tmp)
-set(FINAL_LIBDEPS ${CMAKE_CURRENT_BINARY_DIR}/FinalLibDeps.txt)
+set(LIBDEPS LibDeps.txt)
+set(LIBDEPS_TMP LibDeps.txt.tmp)
+set(FINAL_LIBDEPS FinalLibDeps.txt)
set(LLVM_CONFIG ${LLVM_TOOLS_BINARY_DIR}/llvm-config)
set(LLVM_CONFIG_IN ${CMAKE_CURRENT_BINARY_DIR}/llvm-config.in)
@@ -107,17 +107,18 @@ remove_option_from_llvm_config("-Wall")
remove_option_from_llvm_config("-W")
add_custom_command(OUTPUT ${LLVM_CONFIG}
- COMMAND echo 's!@LLVM_CPPFLAGS@!${CPP_FLGS}!' > temp.sed
- COMMAND echo 's!@LLVM_CFLAGS@!${C_FLGS}!' >> temp.sed
- COMMAND echo 's!@LLVM_CXXFLAGS@!${CXX_FLGS}!' >> temp.sed
+ COMMAND echo s!@LLVM_CPPFLAGS@!${CPP_FLGS}! > temp.sed
+ COMMAND echo s!@LLVM_CFLAGS@!${C_FLGS}! >> temp.sed
+ COMMAND echo s!@LLVM_CXXFLAGS@!${CXX_FLGS}! >> temp.sed
# TODO: Use general flags for linking! not just for shared libs:
- COMMAND echo 's!@LLVM_LDFLAGS@!${CMAKE_SHARED_LINKER_FLAGS}!' >> temp.sed
- COMMAND echo 's!@LIBS@!${LLVM_SYSTEM_LIBS}!' >> temp.sed
- COMMAND echo 's!@LLVM_BUILDMODE@!${CMAKE_BUILD_TYPE}!' >> temp.sed
+ COMMAND echo s!@LLVM_LDFLAGS@!${CMAKE_SHARED_LINKER_FLAGS}! >> temp.sed
+ COMMAND echo s!@LIBS@!${LLVM_SYSTEM_LIBS}! >> temp.sed
+ COMMAND echo s!@LLVM_BUILDMODE@!${CMAKE_BUILD_TYPE}! >> temp.sed
COMMAND sed -f temp.sed < ${LLVM_CONFIG_IN} > ${LLVM_CONFIG}
COMMAND ${CMAKE_COMMAND} -E remove -f temp.sed
COMMAND cat ${FINAL_LIBDEPS} >> ${LLVM_CONFIG}
COMMAND chmod +x ${LLVM_CONFIG}
+ VERBATIM
DEPENDS ${FINAL_LIBDEPS} ${LLVM_CONFIG_IN}
COMMENT "Building llvm-config script."
)