diff options
author | Brad King <brad.king@kitware.com> | 2018-04-25 12:56:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-04-25 12:56:16 (GMT) |
commit | 5a6c6292898fe238f3a5105133b8904209fbedaf (patch) | |
tree | 33e003d33adddf89ac0c04e82788d63a9142670d /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | e5d15848ca6cdc52ff44edcde7689518793a5eb6 (diff) | |
parent | f59c33a763ba1483129f0e721bc2394bb7442876 (diff) | |
download | CMake-5a6c6292898fe238f3a5105133b8904209fbedaf.zip CMake-5a6c6292898fe238f3a5105133b8904209fbedaf.tar.gz CMake-5a6c6292898fe238f3a5105133b8904209fbedaf.tar.bz2 |
Merge topic 'vs-dedup-custom-commands'
f59c33a763 VS: Generate a custom command only in the least dependent target
d58d4daa6b cmVisualStudio10TargetGenerator: Use cmLocalVisualStudio10Generator
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1889
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 1a618a0..50b7d52 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -8,7 +8,7 @@ #include "cmGeneratedFileStream.h" #include "cmGeneratorTarget.h" #include "cmGlobalVisualStudio10Generator.h" -#include "cmLocalVisualStudio7Generator.h" +#include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" #include "cmSourceFile.h" #include "cmSystemTools.h" @@ -204,7 +204,8 @@ cmVisualStudio10TargetGenerator::cmVisualStudio10TargetGenerator( , Name(target->GetName()) , GUID(gg->GetGUID(this->Name)) , GlobalGenerator(gg) - , LocalGenerator((cmLocalVisualStudio7Generator*)target->GetLocalGenerator()) + , LocalGenerator( + (cmLocalVisualStudio10Generator*)target->GetLocalGenerator()) { this->Makefile->GetConfigurations(this->Configurations); this->NsightTegra = gg->IsNsightTegra(); @@ -1177,7 +1178,6 @@ void cmVisualStudio10TargetGenerator::WriteNsightTegraConfigurationValues( void cmVisualStudio10TargetGenerator::WriteCustomCommands() { - this->SourcesVisited.clear(); this->CSharpCustomCommandNames.clear(); std::vector<cmSourceFile const*> customCommands; this->GeneratorTarget->GetCustomCommands(customCommands, ""); @@ -1198,7 +1198,9 @@ void cmVisualStudio10TargetGenerator::WriteCustomCommands() void cmVisualStudio10TargetGenerator::WriteCustomCommand( cmSourceFile const* sf) { - if (this->SourcesVisited.insert(sf).second) { + if (this->LocalGenerator->GetSourcesVisited(this->GeneratorTarget) + .insert(sf) + .second) { if (std::vector<cmSourceFile*> const* depends = this->GeneratorTarget->GetSourceDepends(sf)) { for (cmSourceFile const* di : *depends) { |