From e358a878d675c1937039cce98c6ccc30e01275f0 Mon Sep 17 00:00:00 2001 From: king Date: Thu, 17 Sep 2009 12:42:27 +0000 Subject: [PATCH] Do not call CollapseFullPath for PDB file names Some vendor tools convert PDB file names given on the command line to lower-case before creating the file. When CMake places a mixed-case PDB file name into the build system, the file does not exist the first time and it is written with mixed case. After the first build though the native tool has created a lower-case version of the file. If CMake does CollapseFullPath again, the file exists so the actual-case lookup gets the lower-case name. This causes the build files to change so the project rebuilds. The solution is to avoid calling CollapseFullPath for files generated by the build. In the case of PDB files we already construct them from paths that have been collapsed, so we can just skip the call altogether. See issue #9350. --- Source/cmMakefileExecutableTargetGenerator.cxx | 6 +++--- Source/cmMakefileLibraryTargetGenerator.cxx | 6 +++--- Source/cmMakefileTargetGenerator.cxx | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx index 5b6dcfa7f..2edacee9c 100644 --- a/Source/cmMakefileExecutableTargetGenerator.cxx +++ b/Source/cmMakefileExecutableTargetGenerator.cxx @@ -3,8 +3,8 @@ Program: CMake - Cross-Platform Makefile Generator Module: $RCSfile: cmMakefileExecutableTargetGenerator.cxx,v $ Language: C++ - Date: $Date: 2009-07-08 17:04:02 $ - Version: $Revision: 1.61 $ + Date: $Date: 2009-09-17 12:42:27 $ + Version: $Revision: 1.62 $ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. @@ -161,7 +161,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink) std::string targetFullPathImport = outpathImp + targetNameImport; std::string targetOutPathPDB = this->Convert(targetFullPathPDB.c_str(), - cmLocalGenerator::FULL, + cmLocalGenerator::NONE, cmLocalGenerator::SHELL); // Convert to the output path to use in constructing commands. std::string targetOutPath = diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 4cf99a4fc..f6eb07ef5 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -3,8 +3,8 @@ Program: CMake - Cross-Platform Makefile Generator Module: $RCSfile: cmMakefileLibraryTargetGenerator.cxx,v $ Language: C++ - Date: $Date: 2009-07-08 17:04:03 $ - Version: $Revision: 1.77 $ + Date: $Date: 2009-09-17 12:42:30 $ + Version: $Revision: 1.78 $ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. @@ -426,7 +426,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules // Construct the output path version of the names for use in command // arguments. std::string targetOutPathPDB = - this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL, + this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::NONE, cmLocalGenerator::SHELL); std::string targetOutPath = this->Convert(targetFullPath.c_str(),cmLocalGenerator::START_OUTPUT, diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index b423b519c..e3d9bbc3e 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -3,8 +3,8 @@ Program: CMake - Cross-Platform Makefile Generator Module: $RCSfile: cmMakefileTargetGenerator.cxx,v $ Language: C++ - Date: $Date: 2009-07-03 14:34:10 $ - Version: $Revision: 1.121 $ + Date: $Date: 2009-09-17 12:42:31 $ + Version: $Revision: 1.122 $ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. @@ -613,7 +613,7 @@ cmMakefileTargetGenerator targetFullPathPDB += this->Target->GetPDBName(this->ConfigName); } targetOutPathPDB = - this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::FULL, + this->Convert(targetFullPathPDB.c_str(),cmLocalGenerator::NONE, cmLocalGenerator::SHELL); } cmLocalGenerator::RuleVariables vars; -- 2.11.4.GIT