diff options
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 937b4ce..505d58a 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -418,7 +418,9 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( } std::ostringstream oss; - const char* sep = ""; + if (this->Version >= cmGlobalVisualStudioGenerator::VS10) { + oss << "%(" << tag << ")"; + } std::vector<std::string>::const_iterator de = cmRemoveDuplicates(this->Defines); for (std::string const& di : cmMakeRange(this->Defines.cbegin(), de)) { @@ -437,11 +439,7 @@ void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( } } // Store the flag in the project file. - oss << sep << define; - sep = ";"; - } - if (this->Version >= cmGlobalVisualStudioGenerator::VS10) { - oss << ";%(" << tag << ")"; + oss << ';' << define; } this->OutputFlag(fout, indent, tag, oss.str()); |