diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-12-29 12:52:39 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-04 00:40:54 +0530 |
commit | 731aca216e2e840e114b5ab934e78bd3f8a59e5f (patch) | |
tree | fec181ee00cd8e2e3c7f3b1bfebb934d5ef9619d /test cases/common/2 cpp | |
parent | e36183aab43ce92509a7f8d3a20c46c5e4c85714 (diff) | |
download | meson-731aca216e2e840e114b5ab934e78bd3f8a59e5f.zip meson-731aca216e2e840e114b5ab934e78bd3f8a59e5f.tar.gz meson-731aca216e2e840e114b5ab934e78bd3f8a59e5f.tar.bz2 |
icc: Fix C/C++ std options and add a unit test for them
Compiler versions 15.0 and later actually ignore invalid values for the
-std= option unless `-diag-error 10159` is passed, so we need to put
that in the unit test.
I have tested this with versions 14.0.3, 15.0.6, 16.0.4, and 17.0.1.
Would be great if someone could test with 13.x.y
Diffstat (limited to 'test cases/common/2 cpp')
-rw-r--r-- | test cases/common/2 cpp/meson.build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test cases/common/2 cpp/meson.build b/test cases/common/2 cpp/meson.build index 9c6f71a..6398382 100644 --- a/test cases/common/2 cpp/meson.build +++ b/test cases/common/2 cpp/meson.build @@ -1,3 +1,9 @@ project('c++ test', 'cpp') + +if meson.get_compiler('cpp').get_id() == 'intel' + # Error out if the -std=xxx option is incorrect + add_project_arguments('-diag-error', '10159', language : 'cpp') +endif + exe = executable('trivialprog', 'trivial.cc', extra_files : 'something.txt') test('runtest', exe) |