[Meson] Apply work-around for gtest-related failure on meson 0.50.1
authorWook Song <wook16.song@samsung.com>
Wed, 7 Aug 2019 05:32:55 +0000 (14:32 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Fri, 9 Aug 2019 06:29:12 +0000 (15:29 +0900)
In the case that gtest has been installed via apt (i.e., apt install
libgtest-dev), meson provides the -I options indicating the directory
that does not exist. Therefore, it is failed to build when
'-Wmissing-include-dirs' is set. This patch works around this issue.

Signed-off-by: Wook Song <wook16.song@samsung.com>
meson.build

index 55fdae5..d7b3dc3 100644 (file)
@@ -25,12 +25,15 @@ warning_flags = [
   '-Wformat-nonliteral',
   '-Wformat-security',
   '-Winit-self',
-  '-Wmissing-include-dirs',
   '-Waddress',
   '-Wno-multichar',
   '-Wvla',
   '-Wpointer-arith'
 ]
+# Work around the issue related to gtest cflags
+if meson.version().version_compare('<0.46')
+  warning_flags += '-Wmissing-include-dirs'
+endif
 
 warning_c_flags = [
   '-Wmissing-declarations',