aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Laurila <jlaurila@google.com>2018-03-07 21:37:56 +0100
committerJukka Laurila <jlaurila@google.com>2018-03-09 01:32:22 +0100
commit2fcd9d35c5de0e09cfb571d2bc93fa8961d5903a (patch)
tree93c145b6e44bc39f50d0e241030c4cf4bc2868f1
parent31df4ae1640a23d5f30df9e766b8bf03ad88308d (diff)
downloadmeson-2fcd9d35c5de0e09cfb571d2bc93fa8961d5903a.zip
meson-2fcd9d35c5de0e09cfb571d2bc93fa8961d5903a.tar.gz
meson-2fcd9d35c5de0e09cfb571d2bc93fa8961d5903a.tar.bz2
Add test for bug https://github.com/mesonbuild/meson/issues/3185
-rw-r--r--test cases/common/181 initial c_args/meson.build7
-rw-r--r--test cases/common/181 initial c_args/test_args.txt4
2 files changed, 11 insertions, 0 deletions
diff --git a/test cases/common/181 initial c_args/meson.build b/test cases/common/181 initial c_args/meson.build
new file mode 100644
index 0000000..70a6e7a
--- /dev/null
+++ b/test cases/common/181 initial c_args/meson.build
@@ -0,0 +1,7 @@
+project('options', 'c')
+
+# Test passing c_args and c_link_args options from the command line.
+assert(get_option('c_args') == ['-march=native', '-funroll-loops'],
+ 'Incorrect value for c_args option.')
+assert(get_option('c_link_args') == ['-random_linker_option'],
+ 'Incorrect value for c_link_args option.')
diff --git a/test cases/common/181 initial c_args/test_args.txt b/test cases/common/181 initial c_args/test_args.txt
new file mode 100644
index 0000000..9a6da06
--- /dev/null
+++ b/test cases/common/181 initial c_args/test_args.txt
@@ -0,0 +1,4 @@
+# This file is not read by meson itself, but by the test framework.
+# It is not possible to pass arguments to meson from a file.
+['-Dc_args=-march=native', '-Dc_args=-funroll-loops',
+ '-Dc_link_args=-random_linker_option']