Add an option to disable building tests (#533)
authorasafkahlon <35964924+asafkahlon@users.noreply.github.com>
Wed, 9 Jun 2021 08:07:25 +0000 (11:07 +0300)
committerGitHub <noreply@github.com>
Wed, 9 Jun 2021 08:07:25 +0000 (09:07 +0100)
Signed-off-by: Asaf Kahlon <asafka7@gmail.com>
meson.build
meson_options.txt

index 6feb0a5a5714587a9c33843b672d03501d361f69..79a18c6f979d2b27439112d9be579590229044c0 100644 (file)
@@ -125,7 +125,7 @@ thread_dep = dependency('threads')
 #
 # Read build files from sub-directories
 #
-subdirs = [ 'lib', 'include', 'test' ]
+subdirs = [ 'lib', 'include']
 if get_option('utils') and not platform.endswith('bsd') and platform != 'dragonfly'
   subdirs += [ 'util', 'doc' ]
 endif
@@ -134,6 +134,10 @@ if get_option('examples')
   subdirs += 'example'
 endif
 
+if get_option('tests')
+  subdirs += 'test'
+endif
+
 foreach n : subdirs
     subdir(n)
 endforeach
index 8950ff100e4befa74e28bb0626ba08fb86b49278..43304d12907be09c4cb3d85333e5973741fe3dad 100644 (file)
@@ -13,3 +13,6 @@ option('examples', type : 'boolean', value : true,
 option('useroot', type : 'boolean', value : true,
        description: 'Set owner and setuid bits on installed files')
 
+option('tests', type : 'boolean', value : true,
+       description: 'Compile the test files')
+