summaryrefslogtreecommitdiff
path: root/test cases/common
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/common')
-rw-r--r--test cases/common/1 trivial/meson.build5
-rw-r--r--test cases/common/123 llvm ir and assembly/meson.build5
-rw-r--r--test cases/common/124 cpp and asm/meson.build2
-rw-r--r--test cases/common/132 generated assembly/meson.build2
-rw-r--r--test cases/common/143 C and CPP link/meson.build2
-rw-r--r--test cases/common/2 cpp/meson.build5
-rw-r--r--test cases/common/204 function attributes/meson.build4
-rw-r--r--test cases/common/206 argument syntax/meson.build10
-rw-r--r--test cases/common/40 has function/meson.build2
9 files changed, 20 insertions, 17 deletions
diff --git a/test cases/common/1 trivial/meson.build b/test cases/common/1 trivial/meson.build
index 67d6ed6a3..c71d9b06a 100644
--- a/test cases/common/1 trivial/meson.build
+++ b/test cases/common/1 trivial/meson.build
@@ -6,9 +6,12 @@ project('trivial test',
#this is a comment
sources = 'trivial.c'
-if meson.get_compiler('c').get_id() == 'intel'
+cc = meson.get_compiler('c')
+if cc.get_id() == 'intel'
# Error out if the -std=xxx option is incorrect
add_project_arguments('-diag-error', '10159', language : 'c')
+elif cc.get_id() == 'intel-cl'
+ add_project_arguments('/Qdiag-error:10159', language : 'c')
endif
if meson.is_cross_build()
diff --git a/test cases/common/123 llvm ir and assembly/meson.build b/test cases/common/123 llvm ir and assembly/meson.build
index a67c6c623..3cc7d5e9c 100644
--- a/test cases/common/123 llvm ir and assembly/meson.build
+++ b/test cases/common/123 llvm ir and assembly/meson.build
@@ -41,16 +41,17 @@ foreach lang : ['c', 'cpp']
error('MESON_SKIP_TEST: ML (masm) not found')
endif
# Preprocess file (ml doesn't support pre-processing)
+ # Force the intput to be C (/Tc) because ICL otherwise assumes it's an object (.obj) file
preproc_name = lang + square_base + '.i'
square_preproc = custom_target(lang + square_impl + 'preproc',
input : square_impl,
output : preproc_name,
- command : [cl, '/EP', '/P', '/Fi' + preproc_name, '@INPUT@'] + uscore_args)
+ command : [cl, '/nologo', '/EP', '/P', '/Fi' + preproc_name, '/Tc', '@INPUT@'] + uscore_args)
# Use assembled object file instead of the original .S assembly source
square_impl = custom_target(lang + square_impl,
input : square_preproc,
output : lang + square_base + '.obj',
- command : [ml, '/safeseh', '/Fo', '@OUTPUT@', '/c', '@INPUT@'])
+ command : [ml, '/nologo', '/safeseh', '/Fo', '@OUTPUT@', '/c', '@INPUT@'])
endif
if supported_cpus.contains(cpu)
e = executable('square_asm_' + lang, square_impl, 'main.' + lang,
diff --git a/test cases/common/124 cpp and asm/meson.build b/test cases/common/124 cpp and asm/meson.build
index f0970848e..cf064d007 100644
--- a/test cases/common/124 cpp and asm/meson.build
+++ b/test cases/common/124 cpp and asm/meson.build
@@ -15,7 +15,7 @@ endif
sources = ['trivial.cc']
# If the compiler cannot compile assembly, don't use it
-if not ['msvc', 'clang-cl'].contains(meson.get_compiler('cpp').get_id())
+if not ['msvc', 'clang-cl', 'intel-cl'].contains(meson.get_compiler('cpp').get_id())
sources += ['retval-' + cpu + '.S']
cpp_args = ['-DUSE_ASM']
message('Using ASM')
diff --git a/test cases/common/132 generated assembly/meson.build b/test cases/common/132 generated assembly/meson.build
index 5fb742913..283774729 100644
--- a/test cases/common/132 generated assembly/meson.build
+++ b/test cases/common/132 generated assembly/meson.build
@@ -2,7 +2,7 @@ project('generated assembly', 'c')
cc = meson.get_compiler('c')
-if ['msvc', 'clang-cl'].contains(cc.get_id())
+if ['msvc', 'clang-cl', 'intel-cl'].contains(cc.get_id())
error('MESON_SKIP_TEST: assembly files cannot be compiled directly by the compiler')
endif
diff --git a/test cases/common/143 C and CPP link/meson.build b/test cases/common/143 C and CPP link/meson.build
index 75281de62..a93a981b4 100644
--- a/test cases/common/143 C and CPP link/meson.build
+++ b/test cases/common/143 C and CPP link/meson.build
@@ -30,6 +30,8 @@ if cxx.get_argument_syntax() == 'msvc'
static_linker = find_program('lib')
elif cxx.get_id() == 'clang-cl'
static_linker = find_program('llvm-lib')
+ elif cxx.get_id() == 'intel-cl'
+ static_linker = find_program('xilib')
else
error('unable to determine static linker to use with this compiler')
endif
diff --git a/test cases/common/2 cpp/meson.build b/test cases/common/2 cpp/meson.build
index 639838212..27c4321ab 100644
--- a/test cases/common/2 cpp/meson.build
+++ b/test cases/common/2 cpp/meson.build
@@ -1,8 +1,11 @@
project('c++ test', 'cpp')
-if meson.get_compiler('cpp').get_id() == 'intel'
+cpp = meson.get_compiler('cpp')
+if cpp.get_id() == 'intel'
# Error out if the -std=xxx option is incorrect
add_project_arguments('-diag-error', '10159', language : 'cpp')
+elif cpp.get_id() == 'intel-cl'
+ add_project_arguments('/Qdiag-error:10159', language : 'cpp')
endif
exe = executable('trivialprog', 'trivial.cc', extra_files : 'something.txt')
diff --git a/test cases/common/204 function attributes/meson.build b/test cases/common/204 function attributes/meson.build
index 1e9380302..58ac7c877 100644
--- a/test cases/common/204 function attributes/meson.build
+++ b/test cases/common/204 function attributes/meson.build
@@ -19,7 +19,7 @@ project('gcc func attributes', ['c', 'cpp'])
c = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
-expected_result = not ['msvc', 'clang-cl'].contains(c.get_id())
+expected_result = not ['msvc', 'clang-cl', 'intel-cl'].contains(c.get_id())
# Q: Why is ifunc not in this list or any of the below lists?
# A: It's too damn hard to figure out if you actually support it, since it
@@ -95,7 +95,7 @@ foreach a : ['dllexport', 'dllimport']
endforeach
message('checking get_supported_function_attributes')
-if not ['msvc', 'clang-cl'].contains(c.get_id())
+if not ['msvc', 'clang-cl', 'intel-cl'].contains(c.get_id())
multi_expected = attributes
else
multi_expected = []
diff --git a/test cases/common/206 argument syntax/meson.build b/test cases/common/206 argument syntax/meson.build
index 216da45ba..b97ca7432 100644
--- a/test cases/common/206 argument syntax/meson.build
+++ b/test cases/common/206 argument syntax/meson.build
@@ -5,16 +5,10 @@ project(
cc = meson.get_compiler('c')
-if ['gcc', 'lcc', 'clang'].contains(cc.get_id())
+if ['gcc', 'lcc', 'clang', 'intel'].contains(cc.get_id())
expected = 'gcc'
-elif ['msvc', 'clang-cl'].contains(cc.get_id())
+elif ['msvc', 'clang-cl', 'intel-cl'].contains(cc.get_id())
expected = 'msvc'
-elif cc.get_id() == 'intel'
- if host_machine.system() == 'windows'
- expected = 'msvc'
- else
- expected = 'gcc'
- endif
else
# It's possible that other compilers end up here that shouldn't
expected = 'other'
diff --git a/test cases/common/40 has function/meson.build b/test cases/common/40 has function/meson.build
index eb30acd07..539f313c2 100644
--- a/test cases/common/40 has function/meson.build
+++ b/test cases/common/40 has function/meson.build
@@ -21,7 +21,7 @@ foreach cc : compilers
# not taken from a cache (ie. the check above)
# On MSVC fprintf is defined as an inline function in the header, so it cannot
# be found without the include.
- if cc.get_id() != 'msvc'
+ if not ['msvc', 'intel-cl'].contains(cc.get_id())
assert(cc.has_function('fprintf', args : unit_test_args),
'"fprintf" function not found without include (on !msvc).')
else