Selaa lähdekoodia

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

Alex
Alexander Neundorf 18 vuotta sitten
vanhempi
sitoutus
c3b42e90ed
2 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 1 0
      Modules/CMakeGenericSystem.cmake
  2. 3 0
      Source/cmLocalGenerator.cxx

+ 1 - 0
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 "")

+ 3 - 0
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