mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
VS: De-duplicate PreprocessorDefinitions tag name
Store the name in a variable for re-use.
This commit is contained in:
1 parent
34ce3017b5
commit
f7e5c6820a
1 file changed
+5
-5
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user