diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-26 16:52:13 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-26 23:39:15 +0100 |
| commit | e75e3976facda7de244fbb9a02eebf0d043ea1c8 (patch) | |
| tree | dab22f95b5c837a70b1b4164d97ff351a49ffd81 /test cases/common/66 vcstag | |
| parent | 53fe7c2f0a51697cd57628753852dd3f8711becf (diff) | |
| download | meson-e75e3976facda7de244fbb9a02eebf0d043ea1c8.tar.gz | |
Condense test directory names.
Diffstat (limited to 'test cases/common/66 vcstag')
| -rw-r--r-- | test cases/common/66 vcstag/meson.build | 18 | ||||
| -rw-r--r-- | test cases/common/66 vcstag/tagprog.c | 9 | ||||
| -rw-r--r-- | test cases/common/66 vcstag/vcstag.c.in | 2 |
3 files changed, 29 insertions, 0 deletions
diff --git a/test cases/common/66 vcstag/meson.build b/test cases/common/66 vcstag/meson.build new file mode 100644 index 000000000..7e5983aaa --- /dev/null +++ b/test cases/common/66 vcstag/meson.build @@ -0,0 +1,18 @@ +project('vcstag', 'c') + +version_src = vcs_tag(input : 'vcstag.c.in', +output : 'vcstag.c', +fallback : '1.0.0') + +version_src_custom = vcs_tag(input : 'vcstag.c.in', +output : 'vcstag-custom.c', +command : ['git', 'show-ref', '-s', 'refs/heads/master'], +fallback : '1.0.0') + +version_src_fallback = vcs_tag(input : 'vcstag.c.in', +output : 'vcstag-fallback.c') + +executable('tagprog', 'tagprog.c', version_src) +executable('tagprog-custom', 'tagprog.c', version_src_custom) +executable('tagprog-fallback', 'tagprog.c', version_src_fallback) + diff --git a/test cases/common/66 vcstag/tagprog.c b/test cases/common/66 vcstag/tagprog.c new file mode 100644 index 000000000..27c3cc58d --- /dev/null +++ b/test cases/common/66 vcstag/tagprog.c @@ -0,0 +1,9 @@ +#include<stdio.h> + +extern const char *vcstag; + +int main(void) { + printf("Version is %s\n", vcstag); + return 0; +} + diff --git a/test cases/common/66 vcstag/vcstag.c.in b/test cases/common/66 vcstag/vcstag.c.in new file mode 100644 index 000000000..09192d90d --- /dev/null +++ b/test cases/common/66 vcstag/vcstag.c.in @@ -0,0 +1,2 @@ +const char *vcstag = "@VCS_TAG@"; + |
