diff options
author | Brad King <brad.king@kitware.com> | 2017-03-28 16:56:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-28 17:10:55 (GMT) |
commit | 1449f6f63d09f21203b36b3485dd3eb60c73ac17 (patch) | |
tree | fd8608faeb46b55d931f0dc2ec043e8889f7144a /Source/cmVisualStudioGeneratorOptions.cxx | |
parent | 8a619e8c85def632e9e7938fc5a3a36bb22f46ff (diff) | |
download | CMake-1449f6f63d09f21203b36b3485dd3eb60c73ac17.zip CMake-1449f6f63d09f21203b36b3485dd3eb60c73ac17.tar.gz CMake-1449f6f63d09f21203b36b3485dd3eb60c73ac17.tar.bz2 |
cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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<std::string>::const_iterator de = + cmRemoveDuplicates(this->Defines); for (std::vector<std::string>::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) { |