Debian Codegraph @

test cases/cmake/15 object library advanced/subprojects/cmObjLib/genC.cpp

raw
1 #include <iostream>
2 #include <fstream>
3
4 using namespace std;
5
6 int main() {
7 ofstream hpp("libC.hpp");
8 ofstream cpp("libC.cpp");
9 if (!hpp.is_open() || !cpp.is_open()) {
10 cerr << "Failed to open 'libC.hpp' or 'libC.cpp' for writing" << endl;
11 return 1;
12 }
13
14 hpp << R"cpp(
15 #pragma once
16
17 #include <string>
18
19 std::string getGenStr();
20 )cpp";
21
22 cpp << R"cpp(
23 #include "libC.hpp"
24
25 std::string getGenStr(void) {
26 return "GEN STR";
27 }
28 )cpp";
29
30 return 0;
31 }