From 23ced4e5b809621d37863fab963f7e787d4375cd Mon Sep 17 00:00:00 2001
From: Dominik Loidolt <dominik.loidolt@univie.ac.at>
Date: Thu, 29 Sep 2022 16:02:23 +0200
Subject: [PATCH] set windows flags if system is cygwin

---
 meson.build               | 3 ++-
 test/cmp_tool/meson.build | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 6757167..9705be6 100644
--- a/meson.build
+++ b/meson.build
@@ -7,7 +7,8 @@ project('cmp_tool', 'c',
 
 add_project_arguments('-DDEBUGLEVEL=1', language : 'c')
 
-if host_machine.system() == 'windows' and meson.get_compiler('c').get_id() == 'gcc'
+if (host_machine.system() == 'windows' or host_machine.system() == 'cygwin')
+    and meson.get_compiler('c').get_id() == 'gcc'
   # by default, MinGW on win32 behaves as if it ignores __attribute__((packed)),
   # you need to add -mno-ms-bitfields to make it work as expected.
   # See: https://wintermade.it/blog/posts/__attribute__packed-on-windows-is-ignored-with-mingw.html
diff --git a/test/cmp_tool/meson.build b/test/cmp_tool/meson.build
index be04bb7..b53f4e0 100644
--- a/test/cmp_tool/meson.build
+++ b/test/cmp_tool/meson.build
@@ -8,5 +8,5 @@ if pytest.found()
     depends : cmp_tool_exe,
     workdir : meson.project_build_root())
 else
-  message('Pytest framework not found! Skipping integration tests.')
+  message('Pytest framework not found! Skipping integration tests. Run pip install pytest.')
 endif
-- 
GitLab