فهرست منبع

BUG: make sure relative paths in command line options are expanded

Bill Hoffman 22 سال پیش
والد
کامیت
294dec38c9
1فایلهای تغییر یافته به همراه9 افزوده شده و 2 حذف شده
  1. 9 2
      Source/MFCDialog/CMakeCommandLineInfo.cpp

+ 9 - 2
Source/MFCDialog/CMakeCommandLineInfo.cpp

@@ -3,6 +3,7 @@
 
 #include "stdafx.h"
 #include "CMakeCommandLineInfo.h" 
+#include "cmSystemTools.h"
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -118,15 +119,21 @@ void CMakeCommandLineInfo::ParseParam(LPCTSTR lpszParam, BOOL bFlag, BOOL bLast)
           }
         break;
       case 'B':
-        this->m_WhereBuild = value;
+      {
+        std::string path = cmSystemTools::CollapseFullPath((const char*)value);
+        this->m_WhereBuild = path.c_str();
         break;
+      }
       case 'G':
         this->m_GeneratorChoiceString = value;
         break;
       case 'H':
-        this->m_WhereSource = value;
+      {
+        std::string path = cmSystemTools::CollapseFullPath((const char*)value);
+        this->m_WhereSource = path.c_str();
         break;
       }
+      }
     }
 
   // Call the base class to ensure proper command line processing