summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-02-01 21:52:52 (GMT)
committerBrad King <brad.king@kitware.com>2007-02-01 21:52:52 (GMT)
commited7de15676aa3e1731a16d263ce5113cbb2fe4fc (patch)
tree0c69c2d78abfb18a40cc17da60c55c38b3022f60 /Source
parent4d443926528587e3ce52a301da236a2cce92ec75 (diff)
downloadCMake-ed7de15676aa3e1731a16d263ce5113cbb2fe4fc.zip
CMake-ed7de15676aa3e1731a16d263ce5113cbb2fe4fc.tar.gz
CMake-ed7de15676aa3e1731a16d263ce5113cbb2fe4fc.tar.bz2
BUG: Do not clean the .pdb file for a target just before it is linked! This finishes addressing bug#4341.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefileExecutableTargetGenerator.cxx11
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx6
2 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx b/Source/cmMakefileExecutableTargetGenerator.cxx
index 91038d5..5026834 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -293,9 +293,14 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::UNCHANGED));
}
- exeCleanFiles.push_back(this->Convert(cleanFullPDBName.c_str(),
- cmLocalGenerator::START_OUTPUT,
- cmLocalGenerator::UNCHANGED));
+
+ // List the PDB for cleaning only when the whole target is
+ // cleaned. We do not want to delete the .pdb file just before
+ // linking the target.
+ this->CleanFiles.push_back
+ (this->Convert(cleanFullPDBName.c_str(),
+ cmLocalGenerator::START_OUTPUT,
+ cmLocalGenerator::UNCHANGED));
}
// Add a command to remove any existing files for this executable.
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 39580ad..6f6ab2e 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -401,7 +401,11 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::UNCHANGED));
}
- libCleanFiles.push_back
+
+ // List the PDB for cleaning only when the whole target is
+ // cleaned. We do not want to delete the .pdb file just before
+ // linking the target.
+ this->CleanFiles.push_back
(this->Convert(cleanFullPDBName.c_str(),
cmLocalGenerator::START_OUTPUT,
cmLocalGenerator::UNCHANGED));