ENH: add flag so a terminating slash for the link path can be specified (needed by the Digital Mars D compiler)

Alex
This commit is contained in:
Alexander Neundorf 2007-08-28 16:19:01 -04:00
parent 172821eb38
commit c3b42e90ed
2 changed files with 4 additions and 0 deletions

View File

@ -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 "-I") # -I
SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty SET(CMAKE_INCLUDE_FLAG_C_SEP "") # , or empty
SET(CMAKE_LIBRARY_PATH_FLAG "-L") 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_FLAG "-l")
SET(CMAKE_LINK_LIBRARY_SUFFIX "") SET(CMAKE_LINK_LIBRARY_SUFFIX "")

View File

@ -1531,6 +1531,8 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
} }
std::string libPathFlag = std::string libPathFlag =
this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG"); this->Makefile->GetRequiredDefinition("CMAKE_LIBRARY_PATH_FLAG");
std::string libPathTerminator =
this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR");
std::string libLinkFlag = std::string libLinkFlag =
this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG"); this->Makefile->GetSafeDefinition("CMAKE_LINK_LIBRARY_FLAG");
// collect all the flags needed for linking libraries // collect all the flags needed for linking libraries
@ -1599,6 +1601,7 @@ void cmLocalGenerator::OutputLinkLibraries(std::ostream& fout,
{ {
linkLibs += libPathFlag; linkLibs += libPathFlag;
linkLibs += fullLibPath; linkLibs += fullLibPath;
linkLibs += libPathTerminator;
linkLibs += " "; linkLibs += " ";
// Put this directory in the rpath if using build-tree rpath // Put this directory in the rpath if using build-tree rpath