]> granicus.if.org Git - llvm/commitdiff
[CMake] Use variable interpolation instead of string concatenation
authorSerge Pavlov <sepavloff@gmail.com>
Wed, 22 Mar 2017 12:06:11 +0000 (12:06 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Wed, 22 Mar 2017 12:06:11 +0000 (12:06 +0000)
String concatenation used in r298336 allowed to get rid of extra spaces
but also resulted in lost delimiter spaces, so use previous method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298498 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-config/CMakeLists.txt

index 14a01c62f4ab9be550ba5667264f4078f1b83b94..5112648ea73173bd3b4b23b2f1fe2cfb8e30f268 100644 (file)
@@ -31,9 +31,9 @@ get_property(COMPILE_FLAGS TARGET llvm-config PROPERTY COMPILE_FLAGS)
 # Use configure_file to create BuildVariables.inc.
 set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
 set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
-string(CONCAT LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS}" "${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}" "${LLVM_DEFINITIONS}")
-string(CONCAT LLVM_CFLAGS "${CMAKE_C_FLAGS}" "${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}" "${LLVM_DEFINITIONS}")
-string(CONCAT LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS}" "${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}}" "${COMPILE_FLAGS}" "${LLVM_DEFINITIONS}")
+set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
 set(LLVM_BUILD_SYSTEM cmake)
 set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
 set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}")