| 351 | } |
| 352 | |
| 353 | void cmVisualStudioGeneratorOptions::OutputPreprocessorDefinitions( |
| 354 | std::ostream& fout, int indent, std::string const& lang) |
| 355 | { |
| 356 | if (this->Defines.empty()) { |
| 357 | return; |
| 358 | } |
| 359 | std::string tag = "PreprocessorDefinitions"; |
| 360 | if (lang == "CUDA"_s) { |
| 361 | tag = "Defines"; |
| 362 | } |
| 363 | |
| 364 | std::ostringstream oss; |
| 365 | if (!this->LocalGenerator->IsVFProj()) { |
| 366 | oss << "%(" << tag << ')'; |
| 367 | } |
| 368 | auto de = cmRemoveDuplicates(this->Defines); |
| 369 | for (std::string const& di : cmMakeRange(this->Defines.cbegin(), de)) { |
| 370 | std::string define; |
| 371 | if (!this->LocalGenerator->IsVFProj()) { |
| 372 | // Escape the definition for MSBuild. |
| 373 | define = di; |
| 374 | cmVS10EscapeForMSBuild(define); |
| 375 | if (lang == "RC"_s) { |
| 376 | cmSystemTools::ReplaceString(define, "\"", "\\\""); |
| 377 | } |
| 378 | } else { |
| 379 | // Escape the definition for the compiler. |
| 380 | define = this->LocalGenerator->EscapeForShell(di, true); |
| 381 | } |
| 382 | // Store the flag in the project file. |
| 383 | oss << ';' << define; |
| 384 | } |
| 385 | |
| 386 | this->OutputFlag(fout, indent, tag, oss.str()); |
| 387 | } |
| 388 | |
| 389 | void cmVisualStudioGeneratorOptions::OutputAdditionalIncludeDirectories( |
| 390 | std::ostream& fout, int indent, std::string const& lang) |
no test coverage detected