summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-28 16:56:29 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-28 17:10:55 (GMT)
commit1449f6f63d09f21203b36b3485dd3eb60c73ac17 (patch)
treefd8608faeb46b55d931f0dc2ec043e8889f7144a /Source/cmVisualStudioGeneratorOptions.cxx
parent8a619e8c85def632e9e7938fc5a3a36bb22f46ff (diff)
downloadCMake-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.cxx5
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) {