summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-12-18 12:35:47 +0200
committerGitHub <noreply@github.com>2016-12-18 12:35:47 +0200
commit949c5bb2903511122d8e4a27a33dec7319b24488 (patch)
treeb0f5c15e851ac7da06282bab7d9bd73baae136f8 /test cases
parente3a529886c014a28cbbbe07ab3003cb4500ebd65 (diff)
parent6981d298614118b0663aae766c49a27b83f44733 (diff)
downloadmeson-949c5bb2903511122d8e4a27a33dec7319b24488.tar.gz
Merge pull request #1207 from centricular/has-header-preprocess-only
has_header: Don't compile, only preprocess
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/37 has header/meson.build17
1 files changed, 10 insertions, 7 deletions
diff --git a/test cases/common/37 has header/meson.build b/test cases/common/37 has header/meson.build
index 4f9b94f03..2f763ae4d 100644
--- a/test cases/common/37 has header/meson.build
+++ b/test cases/common/37 has header/meson.build
@@ -5,20 +5,23 @@ foreach comp : [meson.get_compiler('c'), meson.get_compiler('cpp')]
error('Stdio missing.')
endif
- # stdio.h doesn't actually need stdlib.h, but I don't know any headers on
- # UNIX/Linux that need other headers defined beforehand
+ # stdio.h doesn't actually need stdlib.h, but just test that setting the
+ # prefix does not result in an error.
if not comp.has_header('stdio.h', prefix : '#include <stdlib.h>')
error('Stdio missing.')
endif
- # XInput.h needs windows.h included beforehand. We only do this check on MSVC
- # because MinGW often defines its own wrappers that pre-include windows.h
+ # XInput.h should not require type definitions from windows.h, but it does
+ # require macro definitions. Specifically, it requires an arch setting for
+ # VS2015 at least.
+ # We only do this check on MSVC because MinGW often defines its own wrappers
+ # that pre-include windows.h
if comp.get_id() == 'msvc'
if not comp.has_header('XInput.h', prefix : '#include <windows.h>')
- error('XInput.h is missing on Windows')
+ error('XInput.h should not be missing on Windows')
endif
- if comp.has_header('XInput.h')
- error('XInput.h needs windows.h')
+ if not comp.has_header('XInput.h', prefix : '#define _X86_')
+ error('XInput.h should not need windows.h')
endif
endif