From 1449f6f63d09f21203b36b3485dd3eb60c73ac17 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 28 Mar 2017 12:56:29 -0400 Subject: cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs --- Source/cmVisualStudioGeneratorOptions.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index c0913e6..da6f9a7 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -1,5 +1,6 @@ #include "cmVisualStudioGeneratorOptions.h" +#include "cmAlgorithms.h" #include "cmLocalVisualStudioGenerator.h" #include "cmOutputConverter.h" #include "cmSystemTools.h" @@ -267,8 +268,10 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( fout << prefix << "PreprocessorDefinitions=\""; } const char* sep = ""; + std::vector::const_iterator de = + cmRemoveDuplicates(this->Defines); for (std::vector::const_iterator di = this->Defines.begin(); - di != this->Defines.end(); ++di) { + di != de; ++di) { // Escape the definition for the compiler. std::string define; if (this->Version < cmGlobalVisualStudioGenerator::VS10) { -- cgit v0.12