diff options
Diffstat (limited to 'meson/test cases/unit/5 compiler detection')
6 files changed, 40 insertions, 0 deletions
diff --git a/meson/test cases/unit/5 compiler detection/compiler wrapper.py b/meson/test cases/unit/5 compiler detection/compiler wrapper.py new file mode 100644 index 000000000..fedd3434d --- /dev/null +++ b/meson/test cases/unit/5 compiler detection/compiler wrapper.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +import sys +import subprocess + +sys.exit(subprocess.call(sys.argv[1:])) diff --git a/meson/test cases/unit/5 compiler detection/meson.build b/meson/test cases/unit/5 compiler detection/meson.build new file mode 100644 index 000000000..8b47bd47b --- /dev/null +++ b/meson/test cases/unit/5 compiler detection/meson.build @@ -0,0 +1,8 @@ +project('trivial test', + ['c', 'cpp', 'objc', 'objcpp'], + meson_version : '>=0.27.0') + +executable('trivialc', 'trivial.c') +executable('trivialcpp', 'trivial.cc') +executable('trivialobjc', 'trivial.m') +executable('trivialobjcpp', 'trivial.mm') diff --git a/meson/test cases/unit/5 compiler detection/trivial.c b/meson/test cases/unit/5 compiler detection/trivial.c new file mode 100644 index 000000000..24ac454c3 --- /dev/null +++ b/meson/test cases/unit/5 compiler detection/trivial.c @@ -0,0 +1,6 @@ +#include<stdio.h> + +int main(int argc, char **argv) { + printf("Trivial test is working.\n"); + return 0; +} diff --git a/meson/test cases/unit/5 compiler detection/trivial.cc b/meson/test cases/unit/5 compiler detection/trivial.cc new file mode 100644 index 000000000..8aa907b48 --- /dev/null +++ b/meson/test cases/unit/5 compiler detection/trivial.cc @@ -0,0 +1,6 @@ +#include<iostream> + +int main(int argc, char **argv) { + std::cout << "C++ seems to be working." << std::endl; + return 0; +} diff --git a/meson/test cases/unit/5 compiler detection/trivial.m b/meson/test cases/unit/5 compiler detection/trivial.m new file mode 100644 index 000000000..f2e2315eb --- /dev/null +++ b/meson/test cases/unit/5 compiler detection/trivial.m @@ -0,0 +1,5 @@ +#import<stdio.h> + +int main(int argc, char **argv) { + return 0; +}
\ No newline at end of file diff --git a/meson/test cases/unit/5 compiler detection/trivial.mm b/meson/test cases/unit/5 compiler detection/trivial.mm new file mode 100644 index 000000000..927e8104e --- /dev/null +++ b/meson/test cases/unit/5 compiler detection/trivial.mm @@ -0,0 +1,9 @@ +#import<stdio.h> + +class MyClass { +}; + +int main(int argc, char **argv) { + return 0; +} + |