summaryrefslogtreecommitdiffstats
path: root/test cases/cmake/8 custom command/subprojects/cmMod/args_test.cpp
blob: abb8a4266e551ff5387259050f030cc9af887271 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include <fstream>

using namespace std;

int main(int argc, const char *argv[]) {
  if(argc != 3 || string(argv[1]) != "arg1" || string(argv[2]) != "arg2") {
    cerr << argv[0] << " requires 2 args" << endl;
    return 1;
  }

  ifstream in1("macro_name.txt");
  ofstream out1("cmModLib.hpp");
  out1 << "#define " << in1.rdbuf() << " = \"plop\"";


  return 0;
}