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

Method CreateDummyTargetFile

Source/cmExtraCodeBlocksGenerator.cxx:464–482  ·  view source on GitHub ↗

Write a dummy file for OBJECT libraries, so C::B can reference some file

Source from the content-addressed store, hash-verified

462
463// Write a dummy file for OBJECT libraries, so C::B can reference some file
464std::string cmExtraCodeBlocksGenerator::CreateDummyTargetFile(
465 cmGeneratorTarget* target) const
466{
467 // this file doesn't seem to be used by C::B in custom makefile mode,
468 // but we generate a unique file for each OBJECT library so in case
469 // C::B uses it in some way, the targets don't interfere with each other.
470 std::string filename =
471 cmStrCat(target->GetSupportDirectory(), '/', target->GetName(), ".objlib");
472 cmGeneratedFileStream fout(filename);
473 if (fout) {
474 /* clang-format off */
475 fout << "# This is a dummy file for the OBJECT library "
476 << target->GetName()
477 << " for the CMake CodeBlocks project generator.\n"
478 "# Don't edit, this file will be overwritten.\n";
479 /* clang-format on */
480 }
481 return filename;
482}
483
484// Generate the xml code for one target.
485void cmExtraCodeBlocksGenerator::AppendTarget(

Callers 1

AppendTargetMethod · 0.95

Calls 3

GetSupportDirectoryMethod · 0.80
cmStrCatFunction · 0.70
GetNameMethod · 0.45

Tested by

no test coverage detected