summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-02-10 19:23:08 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-14 18:37:54 (GMT)
commitf7e5c6820a6eed8e6f29f7a5634a30b4f42a43aa (patch)
tree2550517baef9fb9a103414833146e7fa1e6da670 /Source/cmVisualStudioGeneratorOptions.cxx
parent34ce3017b530595753b5987bd0702aceded683be (diff)
downloadCMake-f7e5c6820a6eed8e6f29f7a5634a30b4f42a43aa.zip
CMake-f7e5c6820a6eed8e6f29f7a5634a30b4f42a43aa.tar.gz
CMake-f7e5c6820a6eed8e6f29f7a5634a30b4f42a43aa.tar.bz2
VS: De-duplicate PreprocessorDefinitions tag name
Store the name in a variable for re-use.
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index c0913e6..6bacfa1 100644
--- a/Source/cmVisualStudioGeneratorOptions.cxx
+++ b/Source/cmVisualStudioGeneratorOptions.cxx
@@ -252,19 +252,19 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions(
if (this->Defines.empty()) {
return;
}
+ const char* tag = "PreprocessorDefinitions";
if (this->Version >= cmGlobalVisualStudioGenerator::VS10) {
// if there are configuration specific flags, then
// use the configuration specific tag for PreprocessorDefinitions
if (!this->Configuration.empty()) {
fout << prefix;
this->TargetGenerator->WritePlatformConfigTag(
- "PreprocessorDefinitions", this->Configuration.c_str(), 0, 0, 0,
- &fout);
+ tag, this->Configuration.c_str(), 0, 0, 0, &fout);
} else {
- fout << prefix << "<PreprocessorDefinitions>";
+ fout << prefix << "<" << tag << ">";
}
} else {
- fout << prefix << "PreprocessorDefinitions=\"";
+ fout << prefix << tag << "=\"";
}
const char* sep = "";
for (std::vector<std::string>::const_iterator di = this->Defines.begin();
@@ -291,7 +291,7 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions(
sep = ";";
}
if (this->Version >= cmGlobalVisualStudioGenerator::VS10) {
- fout << ";%(PreprocessorDefinitions)</PreprocessorDefinitions>" << suffix;
+ fout << ";%(" << tag << ")</" << tag << ">" << suffix;
} else {
fout << "\"" << suffix;
}