浏览代码

ENH: Converted some ConvertToRelativeOutputPath calls to ConvertToOptionallyRelativeOutputPath in preparation for making ConvertToRelativeOutputPath not check CMAKE_USE_RELATIVE_PATHS.

Brad King 20 年之前
父节点
当前提交
ea258e9a1a
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Source/cmLocalGenerator.cxx

+ 3 - 3
Source/cmLocalGenerator.cxx

@@ -420,7 +420,7 @@ void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname,
                                                       cmTarget& )
                                                       cmTarget& )
 { 
 { 
   std::string objectFile = this->ConvertToRelativeOutputPath(ofname);
   std::string objectFile = this->ConvertToRelativeOutputPath(ofname);
-  std::string sourceFile = this->ConvertToRelativeOutputPath(source.GetFullPath().c_str());
+  std::string sourceFile = this->ConvertToOptionallyRelativeOutputPath(source.GetFullPath().c_str());
   std::string varString = "CMAKE_";
   std::string varString = "CMAKE_";
   varString += lang;
   varString += lang;
   varString += "_COMPILE_OBJECT";
   varString += "_COMPILE_OBJECT";
@@ -746,7 +746,7 @@ cmLocalGenerator::ExpandRuleVariables(std::string& s,
 std::string 
 std::string 
 cmLocalGenerator::ConvertToOutputForExisting(const char* p)
 cmLocalGenerator::ConvertToOutputForExisting(const char* p)
 {
 {
-  std::string ret = this->ConvertToRelativeOutputPath(p);
+  std::string ret = this->ConvertToOptionallyRelativeOutputPath(p);
   // if there are spaces in the path, then get the short path version
   // if there are spaces in the path, then get the short path version
   // if there is one
   // if there is one
   if(ret.find(' ') != std::string::npos)
   if(ret.find(' ') != std::string::npos)
@@ -755,7 +755,7 @@ cmLocalGenerator::ConvertToOutputForExisting(const char* p)
       {
       {
       if(!cmSystemTools::GetShortPath(ret.c_str(), ret))
       if(!cmSystemTools::GetShortPath(ret.c_str(), ret))
         {
         {
-        ret = this->ConvertToRelativeOutputPath(p);
+        ret = this->ConvertToOptionallyRelativeOutputPath(p);
         }
         }
       }
       }
     }
     }