summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-29 13:14:50 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-03-29 13:14:54 (GMT)
commit6dc7262bf77f551a7f3c36d7ca3023c63ef20af8 (patch)
tree456a43d8f048f74bfc8de345c0a984c58431d9b4 /Source/cmVisualStudioGeneratorOptions.cxx
parent4a6a27ad85a4be666a3bb4260105a54ba1cea0eb (diff)
parentfff34934e70da77c359e47c53ffd04701bcd7611 (diff)
downloadCMake-6dc7262bf77f551a7f3c36d7ca3023c63ef20af8.zip
CMake-6dc7262bf77f551a7f3c36d7ca3023c63ef20af8.tar.gz
CMake-6dc7262bf77f551a7f3c36d7ca3023c63ef20af8.tar.bz2
Merge topic 'vs-rc-defines'
fff34934 MSVC: Restore _DEBUG preprocessor definition in RC debug builds 79a91538 RC: Add missing CMAKE_RC_FLAGS_<CONFIG> entries to cache c77194ec VS: Honor preprocessor definitions in RC flags 1449f6f6 cmVisualStudio10TargetGenerator: De-duplicate preprocessor defs 8a619e8c cmIDEOptions: Add GetDefines method Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !640
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 1ca6b9c..abc4924 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"
@@ -403,8 +404,10 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions(
fout << prefix << tag << "=\"";
}
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) {