1f2caadceSEd Tanousproject( 2f2caadceSEd Tanous 'bmcweb', 3f2caadceSEd Tanous 'cpp', 4af6298daSManojkiran Eda version: '1.0', 58dc3ddf6SEd Tanous meson_version: '>=1.3.0', 6af6298daSManojkiran Eda default_options: [ 7cb2ed190SManojkiran Eda 'b_lto_mode=default', 8f523c324SEd Tanous 'b_lto_threads=0', 9f523c324SEd Tanous 'b_lto=true', 10f523c324SEd Tanous 'b_ndebug=if-release', 11f523c324SEd Tanous 'buildtype=debugoptimized', 12f523c324SEd Tanous 'cpp_rtti=false', 13f523c324SEd Tanous 'cpp_std=c++20', 14f523c324SEd Tanous 'warning_level=3', 15f523c324SEd Tanous 'werror=true', 16f2caadceSEd Tanous ], 17f2caadceSEd Tanous) 18af6298daSManojkiran Eda 19af6298daSManojkiran Eda# Project related links 20af6298daSManojkiran Eda 21af6298daSManojkiran Edaproject_pretty_name = 'bmcweb' 22af6298daSManojkiran Edaproject_url = 'https://github.com/openbmc/' + project_pretty_name 23af6298daSManojkiran Edaproject_issues_url = project_url + '/issues/new' 24af6298daSManojkiran Edasummary('Issues', project_issues_url, section: 'Report Issues') 25af6298daSManojkiran Eda 26af6298daSManojkiran Eda# Validate the c++ Standard 27af6298daSManojkiran Eda 28c52ee72bSPatrick Williamsif get_option('cpp_std') != 'c++20' 29c52ee72bSPatrick Williams error('This project requires c++20 support') 30af6298daSManojkiran Edaendif 31af6298daSManojkiran Eda 32af6298daSManojkiran Eda# Get compiler and default build type 33af6298daSManojkiran Eda 34af6298daSManojkiran Edacxx = meson.get_compiler('cpp') 35af6298daSManojkiran Edabuild = get_option('buildtype') 36af6298daSManojkiran Edaoptimization = get_option('optimization') 37af6298daSManojkiran Edasummary('Build Type', build, section: 'Build Info') 38af6298daSManojkiran Edasummary('Optimization', optimization, section: 'Build Info') 39af6298daSManojkiran Eda 40af6298daSManojkiran Eda# remove debug information for minsize buildtype 41af6298daSManojkiran Edaif (get_option('buildtype') == 'minsize') 425e34b67aSEd Tanous add_project_arguments(['-fdata-sections', '-ffunction-sections'], language: 'cpp') 43af6298daSManojkiran Eda add_project_arguments('-DNDEBUG', language: 'cpp') 44af6298daSManojkiran Edaendif 45af6298daSManojkiran Eda 46f8ca6d79SEd Tanousif (get_option('dns-resolver') == 'systemd-dbus') 47f8ca6d79SEd Tanous add_project_arguments('-DBMCWEB_DBUS_DNS_RESOLVER', language: 'cpp') 48f8ca6d79SEd Tanousendif 49f8ca6d79SEd Tanous 50af6298daSManojkiran Eda# Disable lto when compiling with no optimization 51af6298daSManojkiran Edaif (get_option('optimization') == '0') 52af6298daSManojkiran Eda add_project_arguments('-fno-lto', language: 'cpp') 53af6298daSManojkiran Eda message('Disabling lto & its supported features as optimization is disabled') 54af6298daSManojkiran Edaendif 55af6298daSManojkiran Eda 56af6298daSManojkiran Eda# Include Directories 57af6298daSManojkiran Eda 58f2caadceSEd Tanousincdir = include_directories('include', 'redfish-core/include', 'redfish-core/lib', 'http') 59af6298daSManojkiran Eda 60549bed29SPatrick Williamsif (get_option('tests').allowed()) 6125b54dbaSEd Tanous summary('unittest', 'NA', section: 'Features') 62af6298daSManojkiran Edaendif 63af6298daSManojkiran Eda 64af6298daSManojkiran Eda# Add compiler arguments 65af6298daSManojkiran Eda 66ade3f093SEd Tanousif (cxx.get_id() == 'clang') 67ade3f093SEd Tanous if (cxx.version().version_compare('<17.0')) 68ade3f093SEd Tanous error('This project requires clang-17 or higher') 69ade3f093SEd Tanous endif 70af6298daSManojkiran Eda add_project_arguments( 71af6298daSManojkiran Eda '-Weverything', 72ade3f093SEd Tanous '-Wformat=2', 73af6298daSManojkiran Eda '-Wno-c++98-compat-pedantic', 74f523c324SEd Tanous '-Wno-c++98-compat', 7525991f7dSEd Tanous '-Wno-c++20-extensions', 76f523c324SEd Tanous '-Wno-documentation-unknown-command', 77f523c324SEd Tanous '-Wno-documentation', 78af6298daSManojkiran Eda '-Wno-exit-time-destructors', 79f523c324SEd Tanous '-Wno-global-constructors', 80f523c324SEd Tanous '-Wno-newline-eof', 81f523c324SEd Tanous '-Wno-padded', 82af6298daSManojkiran Eda '-Wno-shadow', 83af6298daSManojkiran Eda '-Wno-used-but-marked-unused', 84af6298daSManojkiran Eda '-Wno-weak-vtables', 85e6801eb4SEd Tanous '-Wno-switch-enum', 8672b90760SEd Tanous '-Wno-unused-macros', 874da0490bSEd Tanous '-Wno-covered-switch-default', 88f88b2170SEd Tanous '-Wno-disabled-macro-expansion', 89f2caadceSEd Tanous language: 'cpp', 90f2caadceSEd Tanous ) 91af6298daSManojkiran Edaendif 92af6298daSManojkiran Eda 93ade3f093SEd Tanousif (cxx.get_id() == 'gcc') 94ade3f093SEd Tanous if (cxx.version().version_compare('<13.0')) 95ade3f093SEd Tanous error('This project requires gcc-13 or higher') 96ade3f093SEd Tanous endif 97af6298daSManojkiran Eda 98af6298daSManojkiran Eda add_project_arguments( 99ade3f093SEd Tanous '-Wformat=2', 100ade3f093SEd Tanous '-Wcast-align', 101ade3f093SEd Tanous '-Wconversion', 102ade3f093SEd Tanous '-Woverloaded-virtual', 103ade3f093SEd Tanous '-Wsign-conversion', 104ade3f093SEd Tanous '-Wunused', 105af6298daSManojkiran Eda '-Wduplicated-cond', 106af6298daSManojkiran Eda '-Wduplicated-branches', 107af6298daSManojkiran Eda '-Wlogical-op', 108af6298daSManojkiran Eda '-Wnull-dereference', 109079360aeSEd Tanous '-Wunused-parameter', 110af6298daSManojkiran Eda '-Wdouble-promotion', 1118a592810SEd Tanous '-Wshadow', 11230f11eb4SEd Tanous '-Wno-psabi', 113ade3f093SEd Tanous '-Wno-attributes', 114f2caadceSEd Tanous language: 'cpp', 115f2caadceSEd Tanous ) 116c66403c3SEd Tanousendif 117af6298daSManojkiran Eda 118af6298daSManojkiran Edaif (get_option('buildtype') != 'plain') 119af6298daSManojkiran Eda if (get_option('b_lto') == true and get_option('optimization') != '0') 120af6298daSManojkiran Eda # Reduce the binary size by removing unnecessary 121af6298daSManojkiran Eda # dynamic symbol table entries 122af6298daSManojkiran Eda 123af6298daSManojkiran Eda add_project_arguments( 124f2caadceSEd Tanous cxx.get_supported_arguments( 125f2caadceSEd Tanous [ 126af6298daSManojkiran Eda '-fno-fat-lto-objects', 127af6298daSManojkiran Eda '-fvisibility=hidden', 128f2caadceSEd Tanous '-fvisibility-inlines-hidden', 129f2caadceSEd Tanous ], 130f2caadceSEd Tanous ), 131f2caadceSEd Tanous language: 'cpp', 132f2caadceSEd Tanous ) 133af6298daSManojkiran Eda 134af6298daSManojkiran Eda if cxx.has_link_argument('-Wl,--exclude-libs,ALL') 135af6298daSManojkiran Eda add_project_link_arguments('-Wl,--exclude-libs,ALL', language: 'cpp') 136af6298daSManojkiran Eda endif 137af6298daSManojkiran Eda endif 138c66403c3SEd Tanousendif 139af6298daSManojkiran Eda# Set Compiler Security flags 140af6298daSManojkiran Eda 141af6298daSManojkiran Edasecurity_flags = [ 142af6298daSManojkiran Eda '-fstack-protector-strong', 143af6298daSManojkiran Eda '-fPIE', 144af6298daSManojkiran Eda '-fPIC', 145af6298daSManojkiran Eda '-D_FORTIFY_SOURCE=2', 146af6298daSManojkiran Eda '-Wformat', 147f2caadceSEd Tanous '-Wformat-security', 148af6298daSManojkiran Eda] 149af6298daSManojkiran Eda 150af6298daSManojkiran Eda## Add security flags for builds of type 'release','debugoptimized' and 'minsize' 151af6298daSManojkiran Eda 152f2caadceSEd Tanousif not ( 153f2caadceSEd Tanous get_option('buildtype') == 'plain' 154f2caadceSEd Tanous or get_option('buildtype').startswith('debug') 155f2caadceSEd Tanous) 156f2caadceSEd Tanous add_project_arguments(cxx.get_supported_arguments([security_flags]), language: 'cpp') 157af6298daSManojkiran Edaendif 158af6298daSManojkiran Eda 159af6298daSManojkiran Eda# Boost dependency configuration 160af6298daSManojkiran Eda 161af6298daSManojkiran Edaadd_project_arguments( 162f2caadceSEd Tanous cxx.get_supported_arguments( 163f2caadceSEd Tanous [ 1646fd29553SEd Tanous '-DBOOST_ASIO_DISABLE_CONCEPTS', 165af6298daSManojkiran Eda '-DBOOST_ALL_NO_LIB', 16658e42b18SEd Tanous '-DBOOST_ALLOW_DEPRECATED_HEADERS', 167f523c324SEd Tanous '-DBOOST_ASIO_DISABLE_THREADS', 168f523c324SEd Tanous '-DBOOST_ASIO_NO_DEPRECATED', 169f523c324SEd Tanous '-DBOOST_ASIO_SEPARATE_COMPILATION', 170f523c324SEd Tanous '-DBOOST_BEAST_SEPARATE_COMPILATION', 1719e710e7fSEd Tanous '-DBOOST_EXCEPTION_DISABLE', 172f706551dSEd Tanous '-DBOOST_NO_EXCEPTIONS', 173ab6b6fecSEd Tanous '-DBOOST_URL_NO_SOURCE_LOCATION', 174f88b2170SEd Tanous '-DBOOST_SPIRIT_X3_NO_RTTI', 1759e710e7fSEd Tanous '-DJSON_NOEXCEPTION', 176209aa909SEd Tanous '-DOPENSSL_NO_FILENAMES', 177f706551dSEd Tanous '-DSDBUSPLUS_DISABLE_BOOST_COROUTINES', 178f2caadceSEd Tanous ], 179f2caadceSEd Tanous ), 180f2caadceSEd Tanous language: 'cpp', 181f2caadceSEd Tanous) 182af6298daSManojkiran Eda 183af6298daSManojkiran Eda# Find the dependency modules, if not found use meson wrap to get them 184af6298daSManojkiran Eda# automatically during the configure step 185ceb8ddc1SJason M. Billsbmcweb_dependencies = [] 186af6298daSManojkiran Eda 1878682c5adSNan Zhoupam = cxx.find_library('pam', required: true) 188af6298daSManojkiran Edaatomic = cxx.find_library('atomic', required: true) 189e7923997SEd Tanousbmcweb_dependencies += [pam, atomic] 190e7923997SEd Tanous 191e7923997SEd Tanousopenssl = dependency('openssl', required: false, version: '>=3.0.0') 192e7923997SEd Tanousif not openssl.found() or get_option('b_sanitize') != 'none' 193e7923997SEd Tanous openssl_proj = subproject( 194e7923997SEd Tanous 'openssl', 195e7923997SEd Tanous required: true, 196f2caadceSEd Tanous default_options: ['warning_level=0', 'werror=false'], 197e7923997SEd Tanous ) 198e7923997SEd Tanous openssl = openssl_proj.get_variable('openssl_dep') 199e7923997SEd Tanous openssl = openssl.as_system('system') 200e7923997SEd Tanousendif 201e7923997SEd Tanousbmcweb_dependencies += [openssl] 202af6298daSManojkiran Eda 203fca2cbeaSEd Tanousnghttp2 = dependency('libnghttp2', version: '>=1.52.0', required: false) 204fca2cbeaSEd Tanousif not nghttp2.found() 205fca2cbeaSEd Tanous cmake = import('cmake') 206fca2cbeaSEd Tanous opt_var = cmake.subproject_options() 207211cfa49SEd Tanous opt_var.add_cmake_defines( 208211cfa49SEd Tanous { 209211cfa49SEd Tanous 'ENABLE_LIB_ONLY': true, 210211cfa49SEd Tanous 'ENABLE_STATIC_LIB': true, 211211cfa49SEd Tanous }, 212211cfa49SEd Tanous ) 213fca2cbeaSEd Tanous nghttp2_ex = cmake.subproject('nghttp2', options: opt_var) 214211cfa49SEd Tanous nghttp2 = nghttp2_ex.dependency('nghttp2') 215fca2cbeaSEd Tanousendif 216fca2cbeaSEd Tanousbmcweb_dependencies += nghttp2 217fca2cbeaSEd Tanous 2187bb985eeSEd Tanoussdbusplus = dependency('sdbusplus', required: false, include_type: 'system') 219af6298daSManojkiran Edaif not sdbusplus.found() 220af6298daSManojkiran Eda sdbusplus_proj = subproject('sdbusplus', required: true) 221af6298daSManojkiran Eda sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep') 222af6298daSManojkiran Eda sdbusplus = sdbusplus.as_system('system') 223af6298daSManojkiran Edaendif 224ceb8ddc1SJason M. Billsbmcweb_dependencies += sdbusplus 225af6298daSManojkiran Eda 226c9374ff6SEd Tanoustinyxml = dependency( 227c9374ff6SEd Tanous 'tinyxml2', 228565c0911SPatrick Williams include_type: 'system', 229c9374ff6SEd Tanous version: '>=9.0.0', 23060e299bdSKonstantin Aladyshev default_options: ['tests=false'], 231565c0911SPatrick Williams) 232c9374ff6SEd Tanousif not tinyxml.found() 233c9374ff6SEd Tanous tinyxml_proj = subproject('tinyxml2', required: true) 234c9374ff6SEd Tanous tinyxml = tinyxml_proj.get_variable('tinyxml_dep') 235c9374ff6SEd Tanous tinyxml = tinyxml.as_system('system') 236c9374ff6SEd Tanousendif 237ceb8ddc1SJason M. Billsbmcweb_dependencies += tinyxml 238af6298daSManojkiran Eda 239af6298daSManojkiran Edasystemd = dependency('systemd') 240055713e4SEd Tanousadd_project_arguments('-DSYSTEMD_VERSION=' + systemd.version(), language: 'cpp') 241055713e4SEd Tanous 242af6298daSManojkiran Edazlib = dependency('zlib') 243ceb8ddc1SJason M. Billsbmcweb_dependencies += [systemd, zlib] 244af6298daSManojkiran Eda 245dfd5547bSPatrick Williamsnlohmann_json_dep = dependency('nlohmann_json', version: '>=3.11.2', include_type: 'system') 246dfd5547bSPatrick Williamsbmcweb_dependencies += nlohmann_json_dep 247af6298daSManojkiran Eda 2482b5b4daeSCarson Labradoboost = dependency( 2492b5b4daeSCarson Labrado 'boost', 2502b5b4daeSCarson Labrado modules: [ 2512b5b4daeSCarson Labrado 'url', 2522b5b4daeSCarson Labrado ], 253619b8609SEd Tanous version: '>=1.84.0', 2542b5b4daeSCarson Labrado required: false, 255f2caadceSEd Tanous include_type: 'system', 2562b5b4daeSCarson Labrado) 2576fd29553SEd Tanousif boost.found() 2586fd29553SEd Tanous bmcweb_dependencies += [boost] 2596fd29553SEd Tanouselse 2606fd29553SEd Tanous cmake = import('cmake') 2616fd29553SEd Tanous opt = cmake.subproject_options() 262*f80a87f2SEd Tanous boost_libs = [ 263*f80a87f2SEd Tanous 'asio', 264*f80a87f2SEd Tanous 'beast', 265*f80a87f2SEd Tanous 'circular_buffer', 266*f80a87f2SEd Tanous 'callable_traits', 267*f80a87f2SEd Tanous 'headers', 268*f80a87f2SEd Tanous 'process', 269*f80a87f2SEd Tanous 'type_index', 270*f80a87f2SEd Tanous 'url', 271*f80a87f2SEd Tanous 'uuid', 272*f80a87f2SEd Tanous 'spirit', 273*f80a87f2SEd Tanous ] 274f2caadceSEd Tanous opt.add_cmake_defines( 275f2caadceSEd Tanous { 276*f80a87f2SEd Tanous 'BOOST_INCLUDE_LIBRARIES': ';'.join(boost_libs), 277144983c5SEd Tanous 'BUILD_SHARED_LIBS': 'OFF', 278f2caadceSEd Tanous }, 279f2caadceSEd Tanous ) 280144983c5SEd Tanous 2816fd29553SEd Tanous boost = cmake.subproject('boost', required: true, options: opt) 282*f80a87f2SEd Tanous foreach boost_lib : boost_libs 283*f80a87f2SEd Tanous boost_lib_instance = boost.dependency('boost_' + boost_lib).as_system() 284*f80a87f2SEd Tanous bmcweb_dependencies += [boost_lib_instance] 285*f80a87f2SEd Tanous endforeach 286af6298daSManojkiran Edaendif 287af6298daSManojkiran Eda 288549bed29SPatrick Williamsif get_option('tests').allowed() 289f2caadceSEd Tanous gtest = dependency( 290f2caadceSEd Tanous 'gtest', 291f2caadceSEd Tanous main: true, 292f2caadceSEd Tanous version: '>=1.14.0', 293f2caadceSEd Tanous disabler: true, 294f2caadceSEd Tanous required: false, 295f2caadceSEd Tanous ) 296af6298daSManojkiran Eda gmock = dependency('gmock', required: false) 297549bed29SPatrick Williams if not gtest.found() and get_option('tests').allowed() 298af6298daSManojkiran Eda gtest_proj = subproject('gtest', required: true) 299af6298daSManojkiran Eda gtest = gtest_proj.get_variable('gtest_main_dep') 300af6298daSManojkiran Eda gmock = gtest_proj.get_variable('gmock_dep') 301af6298daSManojkiran Eda endif 302b00dcc27SEd Tanous gtest = gtest.as_system('system') 303b00dcc27SEd Tanous gmock = gmock.as_system('system') 304af6298daSManojkiran Edaendif 305af6298daSManojkiran Eda 3064efe3e0cSPatrick Williamssystemd_system_unit_dir = systemd.get_variable('systemdsystemunitdir') 307af6298daSManojkiran Eda 308af6298daSManojkiran Edabindir = get_option('prefix') + '/' + get_option('bindir') 309af6298daSManojkiran Eda 310f2caadceSEd Tanoussummary( 311f2caadceSEd Tanous { 312af6298daSManojkiran Eda 'prefix': get_option('prefix'), 313af6298daSManojkiran Eda 'bindir': bindir, 314f2caadceSEd Tanous 'systemd unit directory': systemd_system_unit_dir, 315f2caadceSEd Tanous }, 316f2caadceSEd Tanous section: 'Directories', 317f2caadceSEd Tanous) 318af6298daSManojkiran Eda 319a529a6aaSEd Tanoussubdir('static') 320a529a6aaSEd Tanoussubdir('redfish-core') 321af6298daSManojkiran Eda 322307386e8SNan Zhou# Config subdirectory 323307386e8SNan Zhousubdir('config') 324307386e8SNan Zhoubmcweb_dependencies += conf_h_dep 325307386e8SNan Zhou 32602f1cd9bSEd Tanous# Source files 3270ad63df8SNan Zhoufs = import('fs') 328af6298daSManojkiran Eda 3290ad63df8SNan Zhousrcfiles_bmcweb = files( 3303cd7072bSEd Tanous # end large files 3313cd7072bSEd Tanous 33202f1cd9bSEd Tanous 'redfish-core/src/error_messages.cpp', 333f2caadceSEd Tanous # Begin large files, should be at the beginning 33425991f7dSEd Tanous 'redfish-core/src/filter_expr_executor.cpp', 335f88b2170SEd Tanous 'redfish-core/src/filter_expr_printer.cpp', 336f2caadceSEd Tanous 'redfish-core/src/redfish.cpp', 337d1d411f9SSui Chen 'redfish-core/src/registries.cpp', 338d02aad39SEd Tanous 'redfish-core/src/utils/dbus_utils.cpp', 33902f1cd9bSEd Tanous 'redfish-core/src/utils/json_utils.cpp', 3403cd7072bSEd Tanous 'redfish-core/src/utils/time_utils.cpp', 341f523c324SEd Tanous 'src/boost_asio.cpp', 342f2caadceSEd Tanous 'src/boost_asio_ssl.cpp', 343f523c324SEd Tanous 'src/boost_beast.cpp', 3446384e323SNan Zhou 'src/dbus_singleton.cpp', 34561e349acSEd Tanous 'src/json_html_serializer.cpp', 3462c6ffdb0SEd Tanous 'src/ossl_random.cpp', 347f2caadceSEd Tanous 'src/webserver_run.cpp', 3480ad63df8SNan Zhou) 34902f1cd9bSEd Tanous 35042bbcd87SEd Tanousbmcweblib = static_library( 35142bbcd87SEd Tanous 'bmcweblib', 35242bbcd87SEd Tanous srcfiles_bmcweb, 35342bbcd87SEd Tanous include_directories: incdir, 35442bbcd87SEd Tanous dependencies: bmcweb_dependencies, 35542bbcd87SEd Tanous) 35642bbcd87SEd Tanous 35702f1cd9bSEd Tanous# Generate the bmcweb executable 35802f1cd9bSEd Tanousexecutable( 35902f1cd9bSEd Tanous 'bmcweb', 36042bbcd87SEd Tanous 'src/webserver_main.cpp', 361af6298daSManojkiran Eda include_directories: incdir, 362ceb8ddc1SJason M. Bills dependencies: bmcweb_dependencies, 36342bbcd87SEd Tanous link_with: bmcweblib, 3645e34b67aSEd Tanous link_args: '-Wl,--gc-sections', 365af6298daSManojkiran Eda install: true, 366f2caadceSEd Tanous install_dir: bindir, 36702f1cd9bSEd Tanous) 36802f1cd9bSEd Tanous 3690ad63df8SNan Zhousrcfiles_unittest = files( 370c33a039bSNan Zhou 'test/http/crow_getroutes_test.cpp', 37152dd6932SEd Tanous 'test/http/http2_connection_test.cpp', 372f2caadceSEd Tanous 'test/http/http_body_test.cpp', 3734fa45dffSEd Tanous 'test/http/http_connection_test.cpp', 3748e3f7032SAbhilash Raju 'test/http/http_response_test.cpp', 375f2caadceSEd Tanous 'test/http/mutual_tls.cpp', 376f2caadceSEd Tanous 'test/http/mutual_tls_meta.cpp', 377f2caadceSEd Tanous 'test/http/parsing_test.cpp', 378f2caadceSEd Tanous 'test/http/router_test.cpp', 379f2caadceSEd Tanous 'test/http/server_sent_event_test.cpp', 380c33a039bSNan Zhou 'test/http/utility_test.cpp', 3812c9efc3cSEd Tanous 'test/http/verb_test.cpp', 382e1452beaSEd Tanous 'test/include/async_resolve_test.cpp', 38311e8f60dSEd Tanous 'test/include/credential_pipe_test.cpp', 384f2caadceSEd Tanous 'test/include/dbus_utility_test.cpp', 385f2caadceSEd Tanous 'test/include/google/google_service_root_test.cpp', 386f2caadceSEd Tanous 'test/include/http_utility_test.cpp', 387f2caadceSEd Tanous 'test/include/human_sort_test.cpp', 388c33a039bSNan Zhou 'test/include/ibm/configfile_test.cpp', 389f2caadceSEd Tanous 'test/include/json_html_serializer.cpp', 390c33a039bSNan Zhou 'test/include/multipart_test.cpp', 391c33a039bSNan Zhou 'test/include/openbmc_dbus_rest_test.cpp', 3922c6ffdb0SEd Tanous 'test/include/ossl_random.cpp', 393099225ccSEd Tanous 'test/include/ssl_key_handler_test.cpp', 394f2caadceSEd Tanous 'test/include/str_utility_test.cpp', 395c33a039bSNan Zhou 'test/redfish-core/include/privileges_test.cpp', 39625991f7dSEd Tanous 'test/redfish-core/include/filter_expr_executor_test.cpp', 397f88b2170SEd Tanous 'test/redfish-core/include/filter_expr_parser_test.cpp', 3987e8890c5SCarson Labrado 'test/redfish-core/include/redfish_aggregator_test.cpp', 399c33a039bSNan Zhou 'test/redfish-core/include/registries_test.cpp', 400d02aad39SEd Tanous 'test/redfish-core/include/utils/dbus_utils.cpp', 401f2caadceSEd Tanous 'test/redfish-core/include/utils/hex_utils_test.cpp', 402c33a039bSNan Zhou 'test/redfish-core/include/utils/ip_utils_test.cpp', 403c33a039bSNan Zhou 'test/redfish-core/include/utils/json_utils_test.cpp', 404c33a039bSNan Zhou 'test/redfish-core/include/utils/query_param_test.cpp', 405c33a039bSNan Zhou 'test/redfish-core/include/utils/stl_utils_test.cpp', 406c33a039bSNan Zhou 'test/redfish-core/include/utils/time_utils_test.cpp', 407c33a039bSNan Zhou 'test/redfish-core/lib/chassis_test.cpp', 408c33a039bSNan Zhou 'test/redfish-core/lib/log_services_dump_test.cpp', 40975e8e218SMyung Bae 'test/redfish-core/lib/log_services_test.cpp', 410e610b316SJagpal Singh Gill 'test/redfish-core/lib/manager_diagnostic_data_test.cpp', 411090ab8e1SEd Tanous 'test/redfish-core/lib/metadata_test.cpp', 412f2caadceSEd Tanous 'test/redfish-core/lib/power_subsystem_test.cpp', 413f2caadceSEd Tanous 'test/redfish-core/lib/sensors_test.cpp', 414f2caadceSEd Tanous 'test/redfish-core/lib/service_root_test.cpp', 415f2caadceSEd Tanous 'test/redfish-core/lib/system_test.cpp', 416f2caadceSEd Tanous 'test/redfish-core/lib/thermal_subsystem_test.cpp', 417f2caadceSEd Tanous 'test/redfish-core/lib/update_service_test.cpp', 4180ad63df8SNan Zhou) 419af6298daSManojkiran Eda 420549bed29SPatrick Williamsif (get_option('tests').allowed()) 42102f1cd9bSEd Tanous # generate the test executable 4220ad63df8SNan Zhou foreach test_src : srcfiles_unittest 4230ad63df8SNan Zhou test_bin = executable( 4240ad63df8SNan Zhou fs.stem(test_src), 42542bbcd87SEd Tanous test_src, 42642bbcd87SEd Tanous link_with: bmcweblib, 427af6298daSManojkiran Eda include_directories: incdir, 428af6298daSManojkiran Eda install_dir: bindir, 429f2caadceSEd Tanous dependencies: bmcweb_dependencies 430f2caadceSEd Tanous + [ 431cf2f932eSEd Tanous gtest, 432cf2f932eSEd Tanous gmock, 433f2caadceSEd Tanous ], 43402f1cd9bSEd Tanous ) 4350ad63df8SNan Zhou test(fs.stem(test_src), test_bin) 4360ad63df8SNan Zhou endforeach 437af6298daSManojkiran Edaendif 438