Updated meson tests build
This commit is contained in:
		@@ -147,7 +147,7 @@ endif
 | 
				
			|||||||
# ---   Conditionally add subdirs   ---
 | 
					# ---   Conditionally add subdirs   ---
 | 
				
			||||||
# -------------------------------------
 | 
					# -------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if get_option('enable_tests')
 | 
					if get_option('enable_tests') or get_option('enable_tests-ho')
 | 
				
			||||||
    subdir('tests')
 | 
					    subdir('tests')
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,14 +1,15 @@
 | 
				
			|||||||
option('external_fmt',      type: 'boolean', value: false, description: 'Use external fmt package instead of the bundled')
 | 
					option('external_fmt',      type: 'boolean', value: false,  description: 'Use external fmt package instead of the bundled')
 | 
				
			||||||
option('enable_examples',   type: 'boolean', value: true, description: 'Build examples')
 | 
					option('enable_examples',   type: 'boolean', value: true,   description: 'Build examples')
 | 
				
			||||||
option('enable_benchmarks', type: 'boolean', value: false, description: 'Build benchmarks')
 | 
					option('enable_benchmarks', type: 'boolean', value: false,  description: 'Build benchmarks')
 | 
				
			||||||
option('enable_tests',      type: 'boolean', value: true, description: 'Build tests')
 | 
					option('enable_tests',      type: 'boolean', value: true,   description: 'Build tests')
 | 
				
			||||||
 | 
					option('enable_tests_ho',   type: 'boolean', value: false,  description: 'Build header-only tests')
 | 
				
			||||||
option('library_type',      type: 'combo', choices: ['static', 'shared'], value: 'static', description: 'Library build type')
 | 
					option('library_type',      type: 'combo', choices: ['static', 'shared'], value: 'static', description: 'Library build type')
 | 
				
			||||||
option('no_exceptions',     type: 'boolean', value: false, description: 'Disabled exceptions - abort() instead any error')
 | 
					option('no_exceptions',     type: 'boolean', value: false,  description: 'Disabled exceptions - abort() instead any error')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
option('wchar_support',     type: 'boolean', value: false, description:'(Windows only) Support wchar api')
 | 
					option('wchar_support',     type: 'boolean', value: false,  description:'(Windows only) Support wchar api')
 | 
				
			||||||
option('wchar_filenames',   type: 'boolean', value: false, description: '(Windows only) Support wchar filenames')
 | 
					option('wchar_filenames',   type: 'boolean', value: false,  description: '(Windows only) Support wchar filenames')
 | 
				
			||||||
option('clock_coarse',      type: 'boolean', value: false, description:  '(Linux only) Use the much faster (but much less accurate) CLOCK_REALTIME_COARSE instead of the regular clock')
 | 
					option('clock_coarse',      type: 'boolean', value: false,  description:  '(Linux only) Use the much faster (but much less accurate) CLOCK_REALTIME_COARSE instead of the regular clock')
 | 
				
			||||||
option('prevent_child_fd',  type: 'boolean', value: false, description:  'Prevent from child processes to inherit log file descriptors')
 | 
					option('prevent_child_fd',  type: 'boolean', value: false,  description:  'Prevent from child processes to inherit log file descriptors')
 | 
				
			||||||
option('no_thread_id',      type: 'boolean', value: false, description:  'prevent spdlog from querying the thread id on each log call if thread id is not needed')
 | 
					option('no_thread_id',      type: 'boolean', value: false,  description:  'prevent spdlog from querying the thread id on each log call if thread id is not needed')
 | 
				
			||||||
option('no_tls',            type: 'boolean', value: false, description:  'prevent spdlog from using thread local storage')
 | 
					option('no_tls',            type: 'boolean', value: false,  description:  'prevent spdlog from using thread local storage')
 | 
				
			||||||
option('no_atomic_levels',  type: 'boolean', value: false, description:  'prevent spdlog from using of std::atomic log levels (use only if your code never modifies log levels concurrently')
 | 
					option('no_atomic_levels',  type: 'boolean', value: false,  description:  'prevent spdlog from using of std::atomic log levels (use only if your code never modifies log levels concurrently')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,8 +37,12 @@ endif
 | 
				
			|||||||
# --------------------------------------
 | 
					# --------------------------------------
 | 
				
			||||||
# ---   Build the test executables   ---
 | 
					# ---   Build the test executables   ---
 | 
				
			||||||
# --------------------------------------
 | 
					# --------------------------------------
 | 
				
			||||||
test_exe = executable('spdlog-utests', test_sources, dependencies: global_test_deps + [spdlog_dep])
 | 
					if get_option('enable_tests')
 | 
				
			||||||
test('test_spdlog', test_exe, is_parallel : false)
 | 
					    test_exe = executable('spdlog-utests', test_sources, dependencies: global_test_deps + [spdlog_dep])
 | 
				
			||||||
 | 
					    test('test_spdlog', test_exe, is_parallel : false)
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
test_exe = executable('spdlog-utests-ho', test_sources, dependencies: global_test_deps + [spdlog_headeronly_dep])
 | 
					if get_option('enable_tests_ho')
 | 
				
			||||||
test('test_spdlog-ho', test_exe, is_parallel : false)
 | 
					    test_exe = executable('spdlog-utests-ho', test_sources, dependencies: global_test_deps + [spdlog_headeronly_dep])
 | 
				
			||||||
 | 
					    test('test_spdlog-ho', test_exe, is_parallel : false)
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
		Reference in New Issue
	
	Block a user