MCPcopy Create free account
hub / github.com/Kitware/CMake / SetMsvcTargetPdbVariable

Method SetMsvcTargetPdbVariable

Source/cmNinjaTargetGenerator.cxx:531–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529}
530
531bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(
532 cmNinjaVars& vars, std::string const& config) const
533{
534 cmMakefile* mf = this->GetMakefile();
535 if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") ||
536 mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID") ||
537 mf->GetDefinition("MSVC_CUDA_ARCHITECTURE_ID")) {
538 std::string pdbPath;
539 std::string compilePdbPath = this->ComputeTargetCompilePDB(config);
540 if (this->GeneratorTarget->GetType() == cmStateEnums::EXECUTABLE ||
541 this->GeneratorTarget->GetType() == cmStateEnums::STATIC_LIBRARY ||
542 this->GeneratorTarget->GetType() == cmStateEnums::SHARED_LIBRARY ||
543 this->GeneratorTarget->GetType() == cmStateEnums::MODULE_LIBRARY) {
544 pdbPath = cmStrCat(this->GeneratorTarget->GetPDBDirectory(config), '/',
545 this->GeneratorTarget->GetPDBName(config));
546 }
547
548 vars["TARGET_PDB"] =
549 this->ConvertToOutputFormatForShell(this->ConvertToNinjaPath(pdbPath));
550 vars["TARGET_COMPILE_PDB"] = this->ConvertToOutputFormatForShell(
551 this->ConvertToNinjaPath(compilePdbPath));
552
553 this->EnsureParentDirectoryExists(pdbPath);
554 this->EnsureParentDirectoryExists(compilePdbPath);
555 return true;
556 }
557 return false;
558}
559
560void cmNinjaTargetGenerator::WriteLanguageRules(std::string const& language,
561 std::string const& config)

Calls 9

GetMakefileMethod · 0.95
GetPDBDirectoryMethod · 0.80
GetPDBNameMethod · 0.80
cmStrCatFunction · 0.70
GetDefinitionMethod · 0.45
GetTypeMethod · 0.45

Tested by

no test coverage detected