浏览代码

Partial fix from bug #10503, use full paths to fix custom commands.

This fixes tests ExternalProject and LinkDirectory for VS 2010.
Bill Hoffman 15 年之前
父节点
当前提交
cf3e42f811
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 4 2
      Source/cmLocalVisualStudio7Generator.cxx
  2. 1 1
      Source/cmLocalVisualStudioGenerator.cxx

+ 4 - 2
Source/cmLocalVisualStudio7Generator.cxx

@@ -236,7 +236,7 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
 {
   std::string stampName = cmake::GetCMakeFilesDirectoryPostSlash();
   stampName += "generate.stamp";
-  const char* dsprule = 
+  const char* dsprule =
     this->Makefile->GetRequiredDefinition("CMAKE_COMMAND");
   cmCustomCommandLine commandLine;
   commandLine.push_back(dsprule);
@@ -261,7 +261,9 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
                   START_OUTPUT, UNCHANGED, true);
   commandLine.push_back(args);
   commandLine.push_back("--check-stamp-file");
-  commandLine.push_back(stampName.c_str());
+  std::string stampFilename = this->Convert(stampName.c_str(), FULL,
+                                            SHELL);
+  commandLine.push_back(stampFilename.c_str());
 
   std::vector<std::string> const& listFiles = this->Makefile->GetListFiles();
 

+ 1 - 1
Source/cmLocalVisualStudioGenerator.cxx

@@ -169,7 +169,7 @@ cmLocalVisualStudioGenerator
     script += newline;
     newline = newline_text;
     script += "cd ";
-    script += this->Convert(workingDirectory, START_OUTPUT, SHELL);
+    script += this->Convert(workingDirectory, FULL, SHELL);
 
     // Change the working drive.
     if(workingDirectory[0] && workingDirectory[1] == ':')