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

Method OpenBuildFileStream

Source/cmGlobalFastbuildGenerator.cxx:847–872  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

845}
846
847void cmGlobalFastbuildGenerator::OpenBuildFileStream()
848{
849 // Compute Fastbuild's build file path.
850 std::string buildFilePath =
851 this->GetCMakeInstance()->GetHomeOutputDirectory();
852 buildFilePath += "/";
853 buildFilePath += FASTBUILD_BUILD_FILE;
854
855 // Get a stream where to generate things.
856 if (!this->BuildFileStream) {
857 this->BuildFileStream = cm::make_unique<cmGeneratedFileStream>(
858 buildFilePath, false, this->GetMakefileEncoding());
859 if (!this->BuildFileStream) {
860 // An error message is generated by the constructor if it cannot
861 // open the file.
862 return;
863 }
864 }
865
866 // Write the do not edit header.
867 this->WriteDisclaimer();
868
869 // Write a comment about this file.
870 *this->BuildFileStream
871 << "// This file contains all the build statements\n\n";
872}
873
874void cmGlobalFastbuildGenerator::CloseBuildFileStream()
875{

Callers 1

GenerateMethod · 0.95

Calls 3

WriteDisclaimerMethod · 0.95
GetCMakeInstanceMethod · 0.45
GetMakefileEncodingMethod · 0.45

Tested by

no test coverage detected