blob: aa8dd74f5b02c5728eb033ba035c28d5cccf2e3b [file] [log] [blame]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +05301project('bmcweb', 'cpp',
2 version : '1.0',
Patrick Williamsc52ee722021-10-06 15:17:42 -05003 meson_version: '>=0.57.0',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +05304 default_options: [
Manojkiran Edacb2ed192021-02-15 08:30:43 +05305 'b_lto_mode=default',
Ed Tanousf523c322021-12-03 10:46:48 -08006 'b_lto_threads=0',
7 'b_lto=true',
8 'b_ndebug=if-release',
9 'buildtype=debugoptimized',
10 'cpp_rtti=false',
11 'cpp_std=c++20',
12 'warning_level=3',
13 'werror=true',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053014 ])
15
16# Project related links
17
18project_pretty_name = 'bmcweb'
19project_url = 'https://github.com/openbmc/' + project_pretty_name
20project_issues_url = project_url + '/issues/new'
21summary('Issues',project_issues_url, section: 'Report Issues')
22
23# Validate the c++ Standard
24
Patrick Williamsc52ee722021-10-06 15:17:42 -050025if get_option('cpp_std') != 'c++20'
26 error('This project requires c++20 support')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053027endif
28
29# Get compiler and default build type
30
31cxx = meson.get_compiler('cpp')
32build = get_option('buildtype')
33optimization = get_option('optimization')
34summary('Build Type',build, section : 'Build Info')
35summary('Optimization',optimization, section : 'Build Info')
36
Ed Tanous5e34b672021-02-05 14:21:27 -080037
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053038# remove debug information for minsize buildtype
39if(get_option('buildtype') == 'minsize')
Ed Tanous5e34b672021-02-05 14:21:27 -080040 add_project_arguments(['-fdata-sections', '-ffunction-sections'], language : 'cpp')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053041 add_project_arguments('-DNDEBUG', language : 'cpp')
42endif
43
44# Disable lto when compiling with no optimization
45if(get_option('optimization') == '0')
46 add_project_arguments('-fno-lto', language: 'cpp')
47 message('Disabling lto & its supported features as optimization is disabled')
48endif
49
50# Include Directories
51
Ed Tanouscf2f9322021-09-22 15:34:41 -070052incdir = include_directories(
53 'include',
54 'redfish-core/include',
55 'redfish-core/lib',
56 'http'
57)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053058
59# Get the options and enable the respective features
60## create a MAP of "options : feature_flag"
61
62feature_map = {
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053063 'basic-auth' : '-DBMCWEB_ENABLE_BASIC_AUTHENTICATION',
64 'cookie-auth' : '-DBMCWEB_ENABLE_COOKIE_AUTHENTICATION',
65 'google-api' : '-DBMCWEB_ENABLE_GOOGLE_API',
66 'host-serial-socket' : '-DBMCWEB_ENABLE_HOST_SERIAL_WEBSOCKET',
67 'ibm-management-console' : '-DBMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE',
68 'insecure-disable-auth' : '-DBMCWEB_INSECURE_DISABLE_AUTHENTICATION',
69 'insecure-disable-csrf' : '-DBMCWEB_INSECURE_DISABLE_CSRF_PREVENTION',
70 'insecure-disable-ssl' : '-DBMCWEB_INSECURE_DISABLE_SSL',
71 'insecure-push-style-notification' : '-DBMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING',
72 'insecure-tftp-update' : '-DBMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE',
73 'kvm' : '-DBMCWEB_ENABLE_KVM' ,
74 'mutual-tls-auth' : '-DBMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION',
Ed Tanousf523c322021-12-03 10:46:48 -080075 'redfish-allow-deprecated-power-thermal' : '-DBMCWEB_ALLOW_DEPRECATED_POWER_THERMAL',
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053076 'redfish-bmc-journal' : '-DBMCWEB_ENABLE_REDFISH_BMC_JOURNAL',
77 'redfish-cpu-log' : '-DBMCWEB_ENABLE_REDFISH_CPU_LOG',
78 'redfish-dbus-log' : '-DBMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES',
79 'redfish-dump-log' : '-DBMCWEB_ENABLE_REDFISH_DUMP_LOG',
Ed Tanousf523c322021-12-03 10:46:48 -080080 'redfish-host-logger' : '-DBMCWEB_ENABLE_REDFISH_HOST_LOGGER',
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053081 'redfish-new-powersubsystem-thermalsubsystem' : '-DBMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM',
Ed Tanousf523c322021-12-03 10:46:48 -080082 'redfish-provisioning-feature' : '-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE',
83 'redfish' : '-DBMCWEB_ENABLE_REDFISH',
84 'rest' : '-DBMCWEB_ENABLE_DBUS_REST',
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053085 'session-auth' : '-DBMCWEB_ENABLE_SESSION_AUTHENTICATION',
86 'static-hosting' : '-DBMCWEB_ENABLE_STATIC_HOSTING',
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053087 'vm-websocket' : '-DBMCWEB_ENABLE_VM_WEBSOCKET',
88 'xtoken-auth' : '-DBMCWEB_ENABLE_XTOKEN_AUTHENTICATION',
Ed Tanousf523c322021-12-03 10:46:48 -080089 #'vm-nbdproxy' : '-DBMCWEB_ENABLE_VM_NBDPROXY',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053090}
91
92# Get the options status and build a project summary to show which flags are
93# being enabled during the configuration time.
94
95foreach option_key,option_value : feature_map
96 if(get_option(option_key).enabled())
97 if(option_key == 'mutual-tls-auth' or option_key == 'insecure-disable-ssl')
98 if(get_option('insecure-disable-ssl').disabled() or get_option('mutual-tls-auth').disabled())
99 add_project_arguments(option_value,language:'cpp')
100 summary(option_key,option_value, section : 'Enabled Features')
101 endif
102 else
103 summary(option_key,option_value, section : 'Enabled Features')
104 add_project_arguments(option_value,language:'cpp')
105 endif
106 else
107 if(option_key == 'insecure-disable-ssl')
108 summary('ssl','-DBMCWEB_ENABLE_SSL', section : 'Enabled Features')
109 add_project_arguments('-DBMCWEB_ENABLE_SSL', language : 'cpp')
110 endif
111 endif
112endforeach
113
114if(get_option('tests').enabled())
115 summary('unittest','NA', section : 'Enabled Features')
116endif
117
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530118# Add compiler arguments
119
120# -Wpedantic, -Wextra comes by default with warning level
121add_project_arguments(
122 cxx.get_supported_arguments([
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530123 '-Wcast-align',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530124 '-Wconversion',
Ed Tanousf523c322021-12-03 10:46:48 -0800125 '-Wformat=2',
126 '-Wold-style-cast',
127 '-Woverloaded-virtual',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530128 '-Wsign-conversion',
Ed Tanousf523c322021-12-03 10:46:48 -0800129 '-Wunused',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530130 '-Wno-attributes',
131 ]),
132 language: 'cpp'
133)
134
135if (cxx.get_id() == 'clang' and cxx.version().version_compare('>9.0'))
136add_project_arguments(
137 cxx.get_supported_arguments([
138 '-Weverything',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530139 '-Wno-c++98-compat-pedantic',
Ed Tanousf523c322021-12-03 10:46:48 -0800140 '-Wno-c++98-compat',
141 '-Wno-documentation-unknown-command',
142 '-Wno-documentation',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530143 '-Wno-exit-time-destructors',
Ed Tanousf523c322021-12-03 10:46:48 -0800144 '-Wno-global-constructors',
145 '-Wno-newline-eof',
146 '-Wno-padded',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530147 '-Wno-shadow',
148 '-Wno-used-but-marked-unused',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530149 '-Wno-weak-vtables',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530150 ]),
151 language:'cpp')
152endif
153
154# if compiler is gnu-gcc , and version is > 8.0 then we add few more
155# compiler arguments , we know that will pass
156
157if (cxx.get_id() == 'gcc' and cxx.version().version_compare('>8.0'))
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530158 add_project_arguments(
159 cxx.get_supported_arguments([
160 '-Wduplicated-cond',
161 '-Wduplicated-branches',
162 '-Wlogical-op',
163 '-Wunused-parameter',
164 '-Wnull-dereference',
165 '-Wdouble-promotion',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530166 ]),
167 language:'cpp')
Ed Tanousc66403c2021-09-22 15:28:57 -0700168endif
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530169
Ed Tanousc66403c2021-09-22 15:28:57 -0700170if (get_option('buildtype') != 'plain')
171 if (get_option('b_lto') == true and get_option('optimization')!='0')
172 # Reduce the binary size by removing unnecessary
173 # dynamic symbol table entries
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530174
Ed Tanousc66403c2021-09-22 15:28:57 -0700175 add_project_arguments(
176 cxx.get_supported_arguments([
177 '-fno-fat-lto-objects',
178 '-fvisibility=hidden',
179 '-fvisibility-inlines-hidden'
180 ]),
181 language: 'cpp')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530182
Ed Tanousc66403c2021-09-22 15:28:57 -0700183 if cxx.has_link_argument('-Wl,--exclude-libs,ALL')
184 add_project_link_arguments('-Wl,--exclude-libs,ALL', language: 'cpp')
George Liue8204932021-02-01 14:42:49 +0800185 endif
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530186 endif
187endif
188
Ed Tanousc66403c2021-09-22 15:28:57 -0700189if( get_option('bmcweb-logging').enabled() or \
190 get_option('buildtype').startswith('debug'))
191 add_project_arguments([
192 '-DBMCWEB_ENABLE_LOGGING',
193 '-DBMCWEB_ENABLE_DEBUG'
194 ],
195 language : 'cpp')
196
197 summary({'debug' :'-DBMCWEB_ENABLE_DEBUG',
198 'logging' : '-DBMCWEB_ENABLE_LOGGING',
Ed Tanousc66403c2021-09-22 15:28:57 -0700199
Ed Tanousc66403c2021-09-22 15:28:57 -0700200 },section : 'Enabled Features')
201endif
202
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530203# Set Compiler Security flags
204
205security_flags = [
Ed Tanouscf2f9322021-09-22 15:34:41 -0700206 '-fstack-protector-strong',
207 '-fPIE',
208 '-fPIC',
209 '-D_FORTIFY_SOURCE=2',
210 '-Wformat',
211 '-Wformat-security'
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530212]
213
214## Add security flags for builds of type 'release','debugoptimized' and 'minsize'
215
216if not (get_option('buildtype') == 'plain' or get_option('buildtype').startswith('debug'))
217 add_project_arguments(
218 cxx.get_supported_arguments([
219 security_flags
220 ]),
221 language: 'cpp')
222endif
223
224# Boost dependency configuration
225
226add_project_arguments(
227cxx.get_supported_arguments([
Ed Tanouscf2f9322021-09-22 15:34:41 -0700228 '-DBOOST_ALL_NO_LIB',
Ed Tanouscf2f9322021-09-22 15:34:41 -0700229 '-DBOOST_ALLOW_DEPRECATED_HEADERS',
Ed Tanousf523c322021-12-03 10:46:48 -0800230 '-DBOOST_ASIO_DISABLE_THREADS',
231 '-DBOOST_ASIO_NO_DEPRECATED',
232 '-DBOOST_ASIO_SEPARATE_COMPILATION',
233 '-DBOOST_BEAST_SEPARATE_COMPILATION',
234 '-DBOOST_BEAST_USE_STD_STRING_VIEW',
Ed Tanous9e710e72022-03-12 17:40:04 -0800235 '-DBOOST_EXCEPTION_DISABLE',
236 '-DJSON_NOEXCEPTION',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530237]),
238language : 'cpp')
239
240# Find the dependency modules, if not found use meson wrap to get them
241# automatically during the configure step
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800242bmcweb_dependencies = []
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530243
Nan Zhou8682c5a2021-11-13 11:00:07 -0800244pam = cxx.find_library('pam', required: true)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530245atomic = cxx.find_library('atomic', required: true)
246openssl = dependency('openssl', required : true)
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800247bmcweb_dependencies += [pam, atomic, openssl]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530248
Ed Tanous7bb985e2021-09-02 14:31:40 -0700249sdbusplus = dependency('sdbusplus', required : false, include_type: 'system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530250if not sdbusplus.found()
251 sdbusplus_proj = subproject('sdbusplus', required: true)
252 sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep')
253 sdbusplus = sdbusplus.as_system('system')
254endif
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800255bmcweb_dependencies += sdbusplus
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530256
257if get_option('rest').enabled()
Patrick Williams565c0912021-10-12 20:22:45 -0500258 tinyxml = dependency('tinyxml2',
259 default_options: ['tests=false'],
260 include_type: 'system',
261 )
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800262 bmcweb_dependencies += tinyxml
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530263endif
264
265systemd = dependency('systemd')
266zlib = dependency('zlib')
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800267bmcweb_dependencies += [systemd, zlib]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530268
269if cxx.has_header('nlohmann/json.hpp')
270 nlohmann_json = declare_dependency()
271else
Josh Lehan259df352021-10-07 15:20:02 -0700272 nlohmann_json_proj = subproject('nlohmann', required: true)
273 nlohmann_json = nlohmann_json_proj.get_variable('nlohmann_json_dep')
Ed Tanousb00dcc22021-02-23 12:52:50 -0800274 nlohmann_json = nlohmann_json.as_system('system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530275endif
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800276bmcweb_dependencies += nlohmann_json
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530277
Nan Zhou6bbda2c2022-02-21 12:47:41 -0800278boost = dependency('boost',version : '>=1.78.0', required : false, include_type: 'system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530279if not boost.found()
280 subproject('boost', required: false)
Nan Zhou6bbda2c2022-02-21 12:47:41 -0800281 boost_inc = include_directories('subprojects/boost_1_78_0/', is_system:true)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530282 boost = declare_dependency(include_directories : boost_inc)
Ed Tanousb00dcc22021-02-23 12:52:50 -0800283 boost = boost.as_system('system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530284endif
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800285bmcweb_dependencies += boost
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530286
287if cxx.has_header('boost/url/url_view.hpp')
288 boost_url = declare_dependency()
289else
290 subproject('boost-url', required: false)
291 boost_url_inc = include_directories('subprojects/boost-url/include', is_system:true)
292 boost_url= declare_dependency(include_directories : boost_url_inc)
Ed Tanousb00dcc22021-02-23 12:52:50 -0800293 boost_url = boost_url.as_system('system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530294endif
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800295bmcweb_dependencies += boost_url
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530296
297if get_option('tests').enabled()
298 gtest = dependency('gtest', main: true,disabler: true, required : false)
299 gmock = dependency('gmock', required : false)
300 if not gtest.found() and get_option('tests').enabled()
301 gtest_proj = subproject('gtest', required: true)
302 gtest = gtest_proj.get_variable('gtest_main_dep')
303 gmock = gtest_proj.get_variable('gmock_dep')
304 endif
Ed Tanousb00dcc22021-02-23 12:52:50 -0800305 gtest = gtest.as_system('system')
306 gmock = gmock.as_system('system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530307endif
308
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530309# Gather the Configuration data
310
311conf_data = configuration_data()
Ed Tanous0260d9d2021-02-07 19:31:07 +0000312conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit'))
313xss_enabled = get_option('insecure-disable-xss')
Ed Tanousfeaf1502021-02-23 08:53:50 -0800314conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled())
Ed Tanousfa0b2172022-03-24 10:25:03 -0700315enable_redfish_query = get_option('insecure-enable-redfish-query')
316conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled())
Ed Tanous0260d9d2021-02-07 19:31:07 +0000317conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
Vivekanand Veeracholan54d13552021-06-14 19:16:36 -0700318conf_data.set('HTTPS_PORT', get_option('https_port'))
Ed Tanous75312982021-02-11 14:26:02 -0800319configure_file(input: 'bmcweb_config.h.in',
320 output: 'bmcweb_config.h',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530321 configuration: conf_data)
322
323# Configure and install systemd unit files
324
Patrick Williams6a779932021-10-12 20:08:44 -0500325systemd_system_unit_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530326
327bindir = get_option('prefix') + '/' +get_option('bindir')
328
329summary({
330 'prefix' : get_option('prefix'),
331 'bindir' : bindir,
332 'systemd unit directory' : systemd_system_unit_dir
333 }, section : 'Directories')
334
Vivekanand Veeracholan54d13552021-06-14 19:16:36 -0700335configure_file(input : 'bmcweb.socket.in',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530336 output : 'bmcweb.socket',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530337 install_dir: systemd_system_unit_dir,
Vivekanand Veeracholan54d13552021-06-14 19:16:36 -0700338 configuration: conf_data,
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530339 install : true)
340
341configure_file(input : 'bmcweb.service.in',
342 output : 'bmcweb.service',
343 install_dir: systemd_system_unit_dir,
344 configuration: conf_data,
345 install : true)
346
347# Copy pam-webserver to etc/pam.d
348configure_file(input : 'pam-webserver',
349 output : 'webserver',
350 copy : true,
351 install_dir: '/etc/pam.d',
352 install : true)
353
354install_subdir('static', install_dir : 'share/www', strip_directory : true)
355
Ed Tanous02f1cd92021-10-27 12:09:06 -0700356# Source files
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530357
Ed Tanous02f1cd92021-10-27 12:09:06 -0700358srcfiles_bmcweb = [
359 'redfish-core/src/error_messages.cpp',
360 'redfish-core/src/utils/json_utils.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700361 'src/boost_asio_ssl.cpp',
Ed Tanousf523c322021-12-03 10:46:48 -0800362 'src/boost_asio.cpp',
363 'src/boost_beast.cpp',
364 'src/boost_url.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700365]
366
367# Generate the bmcweb executable
368executable(
369 'bmcweb',
370 srcfiles_bmcweb + ['src/webserver_main.cpp'],
371 include_directories : incdir,
372 dependencies: bmcweb_dependencies,
373 link_args: '-Wl,--gc-sections',
374 install: true,
375 install_dir:bindir
376)
377
378srcfiles_unittest = [
Ed Tanousf523c322021-12-03 10:46:48 -0800379 'http/ut/utility_test.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700380 'include/ut/dbus_utility_test.cpp',
381 'include/ut/http_utility_test.cpp',
382 'include/ut/human_sort_test.cpp',
Ed Tanousc5ba4c22022-02-07 09:59:55 -0800383 'include/ut/multipart_test.cpp',
Ed Tanous7cf436c2022-03-22 23:53:51 -0700384 'redfish-core/include/utils/query_param_test.cpp',
385 'redfish-core/lib/ut/service_root_test.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700386 'redfish-core/ut/configfile_test.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700387 'redfish-core/ut/hex_utils_test.cpp',
Willy Tu15ed6782021-12-14 11:03:16 -0800388 'redfish-core/ut/json_utils_test.cpp',
Ed Tanousf523c322021-12-03 10:46:48 -0800389 'redfish-core/ut/lock_test.cpp',
390 'redfish-core/ut/privileges_test.cpp',
Ed Tanousc5ba4c22022-02-07 09:59:55 -0800391 'redfish-core/ut/registries_test.cpp',
Ed Tanousf523c322021-12-03 10:46:48 -0800392 'redfish-core/ut/stl_utils_test.cpp',
393 'redfish-core/ut/time_utils_test.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700394]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530395
396if(get_option('tests').enabled())
Ed Tanous02f1cd92021-10-27 12:09:06 -0700397 # generate the test executable
398 ut_bin = executable(
399 'bmcweb_unit_test',
400 srcfiles_unittest + srcfiles_bmcweb,
401 include_directories : incdir,
402 install_dir: bindir,
403 dependencies: bmcweb_dependencies + [
404 gtest,
405 gmock,
406 ]
407 )
408 test('bmcweb_unit_test', ut_bin)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530409endif