| 845 | } |
| 846 | |
| 847 | void 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 | |
| 874 | void cmGlobalFastbuildGenerator::CloseBuildFileStream() |
| 875 | { |
no test coverage detected