executable('test-filecomp', 'test/filecomp.c', dependencies: test_dep),
env: test_env,
)
-test(
- 'context',
- executable('test-context', 'test/context.c', dependencies: test_dep),
- env: test_env,
-)
+# TODO: This test currently uses some functions that don't exist on Windows.
+if cc.get_id() != 'msvc'
+ test(
+ 'context',
+ executable('test-context', 'test/context.c', dependencies: test_dep),
+ env: test_env,
+ )
+endif
test(
'rules-file',
executable('test-rules-file', 'test/rules-file.c', dependencies: test_dep),
# Demo programs.
-executable('rmlvo-to-kccgst', 'test/rmlvo-to-kccgst.c', dependencies: test_dep)
-executable('rmlvo-to-keymap', 'test/rmlvo-to-keymap.c', dependencies: test_dep)
-executable('print-compiled-keymap', 'test/print-compiled-keymap.c', dependencies: test_dep)
+if cc.has_header_symbol('getopt.h', 'getopt_long', prefix: '#define _GNU_SOURCE')
+ executable('rmlvo-to-kccgst', 'test/rmlvo-to-kccgst.c', dependencies: test_dep)
+ executable('rmlvo-to-keymap', 'test/rmlvo-to-keymap.c', dependencies: test_dep)
+ executable('print-compiled-keymap', 'test/print-compiled-keymap.c', dependencies: test_dep)
+endif
if cc.has_header('linux/input.h')
executable('interactive-evdev', 'test/interactive-evdev.c', dependencies: test_dep)
endif