Check for argument leagake over languages.

pull/15/head
Jussi Pakkanen 12 years ago
parent b97f43b9b7
commit f0cec5bd79
  1. 4
      test cases/23 global arg/builder.txt
  2. 4
      test cases/23 global arg/prog.c
  3. 8
      test cases/23 global arg/prog.cc

@ -1,7 +1,7 @@
project('global arg test', 'c++', 'c')
add_global_arguments('c', '-Werror', '-DMYTHING')
add_global_arguments('c++', '-Werror', '-std=c++11')
add_global_arguments('c', '-DMYTHING')
add_global_arguments('c++', '-DMYCXXTHING')
exe1 = executable('prog', 'prog.c')
exe2 = executable('prog2', 'prog.cc')

@ -2,6 +2,10 @@
#error "Global argument not set"
#endif
#ifdef MYCXXTHING
#error "Wrong global argument set"
#endif
int main(int argc, char **argv) {
return 0;
}

@ -1,4 +1,10 @@
#include<unordered_map>
#ifdef MYTHING
#error "Wrong global argument set"
#endif
#ifndef MYCXXTHING
#error "Global argument not set"
#endif
int main(int argc, char **argv) {
return 0;

Loading…
Cancel
Save