summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalVisualStudio7Generator.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 362c3e7..7795654 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1624,6 +1624,8 @@ bool cmLocalVisualStudio7Generator::WriteGroup(
this->WriteVCProjBeginGroup(fout, name.c_str(), "");
}
+ auto& sourcesVisited = this->GetSourcesVisited(target);
+
// Loop through each source in the source group.
for (const cmSourceFile* sf : sourceFiles) {
std::string source = sf->GetFullPath();
@@ -1647,7 +1649,10 @@ bool cmLocalVisualStudio7Generator::WriteGroup(
// build it, then it will.
fout << "\t\t\t\tRelativePath=\"" << d << "\">\n";
if (cmCustomCommand const* command = sf->GetCustomCommand()) {
- this->WriteCustomRule(fout, configs, source.c_str(), *command, fcinfo);
+ if (sourcesVisited.insert(sf).second) {
+ this->WriteCustomRule(fout, configs, source.c_str(), *command,
+ fcinfo);
+ }
} else if (!fcinfo.FileConfigMap.empty()) {
const char* aCompilerTool = "VCCLCompilerTool";
std::string ppLang = "CXX";