From c3b42e90ed4e4f98b1a055c9e62dc67aeb19e6f2 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 28 Aug 2007 16:19:01 -0400 Subject: ENH: add flag so a terminating slash for the link path can be specified (needed by the Digital Mars D compiler) Alex --- Modules/CMakeGenericSystem.cmake | 1 + Source/cmLocalGenerator.cxx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Modules/CMakeGenericSystem.cmake b/Modules/CMakeGenericSystem.cmake index fb4332d..baecc52 100644 --- a/Modules/CMakeGenericSystem.cmake +++ b/Modules/CMakeGenericSystem.cmake @@ -6,6 +6,7 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP "") # : or empty SET(CMAKE_INCLUDE_FLAG_C "-I") # -I SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty SET(CMAKE_LIBRARY_PATH_FLAG "-L") +SET(CMAKE_LIBRARY_PATH_TERMINATOR "") # for the Digital Mars D compiler the link paths have to be terminated with a "/" SET(CMAKE_LINK_LIBRARY_FLAG "-l") SET(CMAKE_LINK_LIBRARY_SUFFIX "") diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 87b34a1..7857072 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1531,6 +1531,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout, } std::string libPathFlag = this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); + std::string libPathTerminator = + this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); std::string libLinkFlag = this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG"); // collect all the flags needed for linking libraries @@ -1599,6 +1601,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout, { linkLibs += libPathFlag; linkLibs += fullLibPath; + linkLibs += libPathTerminator; linkLibs += " "; // Put this directory in the rpath if using build-tree rpath -- cgit v0.12