test cases/cmake/8 custom command/subprojects/cmMod/args_test.cpp
raw| 1 | #include <iostream> |
| 2 | #include <fstream> |
| 3 | |
| 4 | using namespace std; |
| 5 | |
| 6 | int main(int argc, const char *argv[]) { |
| 7 | if(argc != 3 || string(argv[1]) != "arg1" || string(argv[2]) != "arg2") { |
| 8 | cerr << argv[0] << " requires 2 args" << endl; |
| 9 | return 1; |
| 10 | } |
| 11 | |
| 12 | ifstream in1("macro_name.txt"); |
| 13 | ofstream out1("cmModLib.hpp"); |
| 14 | out1 << "#define " << in1.rdbuf() << " = \"plop\""; |
| 15 | |
| 16 | |
| 17 | return 0; |
| 18 | } |