[pkg-d-commits] [ldc] 189/211: CMake: Tweak quotes around cmdline options

Matthias Klumpp mak at moszumanska.debian.org
Sun Apr 23 22:36:22 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.1.0
in repository ldc.

commit 46d028434681b8ff715d48896506efdfb45239f0
Author: Martin <noone at nowhere.com>
Date:   Sun Dec 4 20:19:23 2016 +0100

    CMake: Tweak quotes around cmdline options
    
    E.g., LDC options such as `-L"-Wl,..."` don't work for Travis OSX, so use
    `"-L-Wl,..."` instead. This may also help with expanding the flags, as
    they aren't a CMake list (a string with semicolons separating the items),
    but a string with the arguments separated by spaces (we do use
    `separate_arguments()` in some places later on to convert it to a list).
---
 CMakeLists.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c44137d..475b1e0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -440,9 +440,9 @@ endif()
 append("-version=IN_LLVM" DDMD_DFLAGS)
 append("-DIN_LLVM" CMAKE_CXX_FLAGS)
 append("-DOPAQUE_VTBLS" CMAKE_CXX_FLAGS)
-append("-DLDC_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\"" CMAKE_CXX_FLAGS)
+append("\"-DLDC_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}\"" CMAKE_CXX_FLAGS)
 append("-DLDC_LLVM_VER=${LDC_LLVM_VER}" CMAKE_CXX_FLAGS)
-append("-DLDC_LIBDIR_SUFFIX=\"\\\"${LIB_SUFFIX}\\\"\"" CMAKE_CXX_FLAGS)
+append("\"-DLDC_LIBDIR_SUFFIX=\\\"${LIB_SUFFIX}\\\"\"" CMAKE_CXX_FLAGS)
 
 if(GENERATE_OFFTI)
     append("-DGENERATE_OFFTI" CMAKE_CXX_FLAGS)
@@ -570,7 +570,7 @@ else()
     set(LDC_TRANSLATED_LINKER_FLAGS "")
     foreach(f ${LDC_LINKERFLAG_LIST})
         string(REPLACE "-LIBPATH:" "/LIBPATH:" f ${f})
-        append("-L\"${f}\"" LDC_TRANSLATED_LINKER_FLAGS)
+        append("\"-L${f}\"" LDC_TRANSLATED_LINKER_FLAGS)
     endforeach()
 
     if(MSVC)
@@ -605,7 +605,7 @@ function(build_d_executable output_exe compiler_args linker_args compile_deps li
           separate_arguments(lflags WINDOWS_COMMAND "${lflags}")
         endif()
         foreach(f ${linker_args})
-            append("-L\"${f}\"" lflags)
+            append("\"-L${f}\"" lflags)
         endforeach()
         add_custom_command(
             OUTPUT ${output_exe}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list