Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 1 | project( |
| 2 | 'entity-manager', |
| 3 | 'cpp', |
| 4 | default_options: [ |
| 5 | 'warning_level=3', |
| 6 | 'werror=true', |
Patrick Williams | 22ed428 | 2021-10-06 15:33:01 -0500 | [diff] [blame] | 7 | 'cpp_std=c++20' |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 8 | ], |
| 9 | license: 'Apache-2.0', |
| 10 | version: '0.1', |
Patrick Williams | ee1db76 | 2023-04-12 08:05:58 -0500 | [diff] [blame] | 11 | meson_version: '>=0.58.0', |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 12 | ) |
Brad Bishop | ec98491 | 2020-10-01 10:24:55 -0400 | [diff] [blame] | 13 | add_project_arguments('-Wno-psabi', language: 'cpp') |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 14 | |
| 15 | boost_args = [ |
| 16 | '-DBOOST_SYSTEM_NO_DEPRECATED', |
| 17 | '-DBOOST_ERROR_CODE_HEADER_ONLY', |
| 18 | '-DBOOST_NO_RTTI', |
| 19 | '-DBOOST_NO_TYPEID', |
| 20 | '-DBOOST_ALL_NO_LIB', |
Ed Tanous | 07d467b | 2021-02-23 14:48:37 -0800 | [diff] [blame] | 21 | '-DBOOST_ALLOW_DEPRECATED_HEADERS' |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 22 | ] |
| 23 | build_tests = get_option('tests') |
Brad Bishop | e3a12b6 | 2020-01-15 11:56:29 -0500 | [diff] [blame] | 24 | cpp = meson.get_compiler('cpp') |
Brad Bishop | 787e828 | 2020-01-15 12:16:53 -0500 | [diff] [blame] | 25 | boost = dependency('boost', required: false) |
| 26 | if not boost.found() |
| 27 | subproject('boost', required: false) |
| 28 | boost = declare_dependency( |
| 29 | include_directories: 'subprojects/boost_1_71_0', |
| 30 | ) |
Ed Tanous | 07d467b | 2021-02-23 14:48:37 -0800 | [diff] [blame] | 31 | boost = boost.as_system('system') |
Brad Bishop | 787e828 | 2020-01-15 12:16:53 -0500 | [diff] [blame] | 32 | endif |
Brad Bishop | 92daaaa | 2020-01-20 15:45:01 -0500 | [diff] [blame] | 33 | if get_option('fru-device') |
| 34 | i2c = cpp.find_library('i2c') |
| 35 | endif |
Andrew Jeffery | 14a7bc9 | 2021-08-02 10:01:22 +0930 | [diff] [blame] | 36 | |
Patrick Williams | 7e11982 | 2023-12-07 11:38:19 -0600 | [diff] [blame] | 37 | nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system') |
Andrew Jeffery | 14a7bc9 | 2021-08-02 10:01:22 +0930 | [diff] [blame] | 38 | |
Brad Bishop | 6765d90 | 2020-01-15 12:31:41 -0500 | [diff] [blame] | 39 | sdbusplus = dependency('sdbusplus', required: false) |
| 40 | if not sdbusplus.found() |
Patrick Williams | 7f5a336 | 2020-06-01 09:30:47 -0500 | [diff] [blame] | 41 | sdbusplus_proj = subproject('sdbusplus', required: true) |
| 42 | sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep') |
Ed Tanous | 07d467b | 2021-02-23 14:48:37 -0800 | [diff] [blame] | 43 | sdbusplus = sdbusplus.as_system('system') |
Brad Bishop | 6765d90 | 2020-01-15 12:31:41 -0500 | [diff] [blame] | 44 | endif |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 45 | systemd = dependency('systemd') |
Patrick Williams | ee1db76 | 2023-04-12 08:05:58 -0500 | [diff] [blame] | 46 | systemd_system_unit_dir = systemd.get_variable( |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 47 | 'systemdsystemunitdir', |
Patrick Williams | ee1db76 | 2023-04-12 08:05:58 -0500 | [diff] [blame] | 48 | pkgconfig_define: ['prefix', get_option('prefix')]) |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 49 | packagedir = join_paths( |
| 50 | get_option('prefix'), |
| 51 | get_option('datadir'), |
| 52 | meson.project_name(), |
| 53 | ) |
Andrew Jeffery | a9c5892 | 2021-06-01 09:28:59 +0930 | [diff] [blame] | 54 | sysconfdir = join_paths( |
| 55 | get_option('prefix'), |
| 56 | get_option('sysconfdir'), |
| 57 | meson.project_name(), |
| 58 | ) |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 59 | threads = dependency('threads') |
Ed Tanous | 55ae5a8 | 2021-08-02 14:00:02 -0700 | [diff] [blame] | 60 | if cpp.has_header('valijson/validator.hpp') |
| 61 | valijson = declare_dependency() |
| 62 | else |
| 63 | subproject('valijson', required: false) |
| 64 | valijson = declare_dependency( |
| 65 | include_directories: 'subprojects/valijson/include' |
| 66 | ) |
| 67 | valijson = valijson.as_system('system') |
Brad Bishop | ff1ddb7 | 2020-01-15 12:24:56 -0500 | [diff] [blame] | 68 | endif |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 69 | |
| 70 | install_data('blacklist.json') |
| 71 | |
| 72 | configs = [ |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 73 | '1ux16_riser.json', |
| 74 | '2ux8_riser.json', |
Ali El-Haj-Mahmoud | ffe7df4 | 2023-05-08 14:27:22 -0400 | [diff] [blame] | 75 | '3ypower_vast2112_psu.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 76 | '8x25_hsbp.json', |
| 77 | 'a2ul16riser.json', |
| 78 | 'a2ux8x4riser.json', |
| 79 | 'acbell_rica_psu.json', |
Alexander Hansen | 719432e | 2023-08-01 17:28:59 +0200 | [diff] [blame] | 80 | 'acbel_r1ca2122a_psu.json', |
Zev Weiss | 3419592 | 2024-02-20 08:06:33 +0000 | [diff] [blame] | 81 | 'asrock_c3_medium_x86.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 82 | 'asrock_e3c246d4i.json', |
Zev Weiss | 0af3542 | 2023-11-07 03:24:33 +0000 | [diff] [blame] | 83 | 'asrock_e3c256d4i.json', |
Zev Weiss | fcd6011 | 2023-11-07 08:10:41 +0000 | [diff] [blame] | 84 | 'asrock_m3_small_x86.json', |
Zev Weiss | 86930a1 | 2023-11-07 08:10:41 +0000 | [diff] [blame] | 85 | 'asrock_n3_xlarge_x86.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 86 | 'asrock_romed8hm3.json', |
Zev Weiss | 544d6ec | 2023-11-07 03:24:33 +0000 | [diff] [blame] | 87 | 'asrock_spc621d8hm3.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 88 | 'bletchley_baseboard.json', |
| 89 | 'bletchley_chassis.json', |
Potin Lai | 546d375 | 2022-11-10 08:57:47 +0800 | [diff] [blame] | 90 | 'bletchley_frontpanel.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 91 | 'blyth.json', |
| 92 | 'ahw1um2riser.json', |
| 93 | 'aspower_u1a-d10550_psu.json', |
| 94 | 'aspower_u1a-d10800_psu.json', |
| 95 | 'aspower_u1a-d11200_psu.json', |
| 96 | 'aspower_u1a-d11600_psu.json', |
| 97 | 'aspower_u1d-d10800_psu.json', |
| 98 | 'axx1p100hssi_aic.json', |
| 99 | 'axx2prthdhd.json', |
Delphine CC Chiu | b64a3ae | 2024-01-17 11:17:18 +0800 | [diff] [blame] | 100 | 'bmc_storage_module.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 101 | 'bnp_baseboard.json', |
| 102 | 'bellavista.json', |
Matt Spinler | 513976b | 2024-05-13 11:24:03 -0500 | [diff] [blame] | 103 | 'blueridge_1s4u_chassis.json', |
| 104 | 'blueridge_2u_chassis.json', |
| 105 | 'blueridge_4u_chassis.json', |
Adriana Kobylak | 0b5b122 | 2023-01-31 14:15:27 -0600 | [diff] [blame] | 106 | 'bonnell.json', |
Potin Lai | 6a50465 | 2024-04-23 15:34:51 +0800 | [diff] [blame] | 107 | 'brcm_100g_1p_ocp_mezz.json', |
Daniel Hsu | 0249bbd | 2024-03-22 16:22:26 +0800 | [diff] [blame] | 108 | 'brcm_200g_1p_ocp_mezz.json', |
Potin Lai | ae326c7 | 2024-02-15 15:08:31 +0800 | [diff] [blame] | 109 | 'cx7_ocp.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 110 | 'delta_awf2dc3200w_psu.json', |
| 111 | 'delta_dps-750xb_psu.json', |
| 112 | 'delta_dps-1600ab_psu.json', |
| 113 | 'delta_dps-2000ab_psu.json', |
Marvin Drees | ac7bae3 | 2023-05-10 09:30:35 +0200 | [diff] [blame] | 114 | 'supermicro-pws-920p-sq_psu.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 115 | 'everest.json', |
| 116 | 'f1u12x25_hsbp.json', |
| 117 | 'f1u4x25_hsbp.json', |
| 118 | 'f2u12x35_hsbp.json', |
| 119 | 'f2u8x25_hsbp.json', |
| 120 | 'fbtp.json', |
| 121 | 'fbyv2.json', |
Jayashree Dhanapal | 90249e2 | 2022-06-13 15:00:57 +0530 | [diff] [blame] | 122 | 'fbyv35.json', |
Jayashree Dhanapal | 8232a6a | 2022-06-21 15:50:50 +0530 | [diff] [blame] | 123 | 'fbyv35_nic_mellanox.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 124 | 'flextronics_s-1100adu00-201_psu.json', |
George Liu | e65c37f | 2024-02-18 11:33:39 +0800 | [diff] [blame] | 125 | 'fp5280g3_chassis.json', |
George Liu | ecaec95 | 2024-02-02 13:46:10 +0800 | [diff] [blame] | 126 | 'fp5280g3_fanboard.json', |
Matt Spinler | 6ef5f71 | 2024-05-13 11:19:40 -0500 | [diff] [blame] | 127 | 'fuji.json', |
Naresh Solanki | e3b6582 | 2022-11-02 10:29:38 +0100 | [diff] [blame] | 128 | 'genesis3_psu.json', |
| 129 | 'genesis3_baseboard.json', |
| 130 | 'genesis3_chassis.json', |
Alexander Hansen | f60262d | 2023-07-26 13:28:15 +0200 | [diff] [blame] | 131 | 'gospower_g1136-1300wna_psu.json', |
BonnieLo-wiwynn | cbaec70 | 2022-11-17 15:42:46 +0800 | [diff] [blame] | 132 | 'greatlakes.json', |
| 133 | 'greatlakes_nic_mellanox.json', |
Potin Lai | 16152b5 | 2023-10-31 18:48:02 +0800 | [diff] [blame] | 134 | 'harma_bsm.json', |
| 135 | 'harma_fanboard.json', |
| 136 | 'harma_mb.json', |
Peter Yin | 9655240 | 2024-05-17 11:17:34 +0800 | [diff] [blame] | 137 | 'harma_mb_vr_infineon.json', |
Potin Lai | 16152b5 | 2023-10-31 18:48:02 +0800 | [diff] [blame] | 138 | 'harma_scm.json', |
Andrew Geissler | 3a1cbe2 | 2023-02-17 13:57:15 -0600 | [diff] [blame] | 139 | 'ibm_tacoma_rack_controller.json', |
Matt Spinler | 6028d13 | 2024-01-17 11:25:17 -0600 | [diff] [blame] | 140 | 'ingraham.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 141 | 'intel_front_panel.json', |
| 142 | 'kudo_bmc.json', |
| 143 | 'kudo_motherboard.json', |
Andrew Jeffery | 8f163c0 | 2023-09-19 16:11:01 +0930 | [diff] [blame] | 144 | 'micron_7450.json', |
Yang Chen | 535568c | 2023-11-23 15:47:04 +0800 | [diff] [blame] | 145 | 'minerva_cmm.json', |
Yang Chen | a7ff205 | 2024-07-17 14:31:58 +0800 | [diff] [blame^] | 146 | 'minerva_cmm_hsc_infineon.json', |
Yang Chen | bff584a | 2024-01-15 17:05:39 +0800 | [diff] [blame] | 147 | 'minerva_cmm_bsm.json', |
Yang Chen | 6254f08 | 2023-12-20 21:07:29 +0800 | [diff] [blame] | 148 | 'minerva_cmm_scm.json', |
Yang Chen | 8d2ed84 | 2024-01-03 15:02:53 +0800 | [diff] [blame] | 149 | 'minerva_fanboard.json', |
Potin Lai | 16152b5 | 2023-10-31 18:48:02 +0800 | [diff] [blame] | 150 | 'minerva_pdb.json', |
| 151 | 'minerva_pttv.json', |
Potin Lai | 16152b5 | 2023-10-31 18:48:02 +0800 | [diff] [blame] | 152 | 'minerva_sitv.json', |
Jonico Eustaquio | aa9bb3d | 2023-04-18 15:24:24 -0500 | [diff] [blame] | 153 | 'mori_bmc.json', |
Jonico Eustaquio | 8809d71 | 2023-05-03 11:49:00 -0500 | [diff] [blame] | 154 | 'mori_motherboard.json', |
Thang Q. Nguyen | 7986595 | 2023-06-28 09:32:32 +0700 | [diff] [blame] | 155 | 'mtjade.json', |
Chau Ly | e2400c8 | 2022-12-16 04:15:43 +0000 | [diff] [blame] | 156 | 'mtmitchell_bmc.json', |
| 157 | 'mtmitchell_mb.json', |
Andrew Geissler | 4139c3a | 2023-10-12 04:34:33 -0600 | [diff] [blame] | 158 | 'mudflap.json', |
Tao Lin | eb588b1 | 2024-06-06 15:42:05 +0800 | [diff] [blame] | 159 | 'nf5280m7_baseboard.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 160 | 'nisqually.json', |
Tim Lee | 6173513 | 2024-04-29 09:59:38 +0800 | [diff] [blame] | 161 | 'nuvoton_npcm8xx_evb.json', |
Patrick Rudolph | e89005d | 2024-02-06 16:06:06 +0100 | [diff] [blame] | 162 | 'nvme_intel_p_series.json', |
Patrick Rudolph | 72e53ab | 2023-11-20 08:55:55 +0100 | [diff] [blame] | 163 | 'nvme_p4500_p5500.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 164 | 'pcie_ssd_retimer.json', |
Adriana Kobylak | 0b5b122 | 2023-01-31 14:15:27 -0600 | [diff] [blame] | 165 | 'pennybacker.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 166 | 'pssf132202a.json', |
| 167 | 'pssf162205a.json', |
| 168 | 'pssf212201a.json', |
| 169 | 'pssf222201a.json', |
| 170 | 'rainier_2u_chassis.json', |
| 171 | 'rainier_4u_chassis.json', |
| 172 | 'rainier_1s4u_chassis.json', |
| 173 | 'r1000_chassis.json', |
| 174 | 'r2000_chassis.json', |
| 175 | 'sas_module.json', |
Naresh Solanki | 6fa508c | 2023-07-31 11:36:15 +0200 | [diff] [blame] | 176 | 'sbp1_baseboard.json', |
| 177 | 'sbp1_chassis.json', |
Patrick Rudolph | e2d550f | 2023-09-11 15:32:38 +0200 | [diff] [blame] | 178 | 'sbp1_nvme.json', |
Naresh Solanki | 6fa508c | 2023-07-31 11:36:15 +0200 | [diff] [blame] | 179 | 'sbp1_psu.json', |
Patrick Rudolph | 2e61474 | 2023-11-10 15:11:51 +0100 | [diff] [blame] | 180 | 'sbp1_rssd.json', |
Naresh Solanki | 9027b29 | 2023-11-24 11:20:53 +0000 | [diff] [blame] | 181 | 'sbp1_hbm.json', |
Andrew Geissler | 35215e9 | 2023-10-02 06:48:05 -0500 | [diff] [blame] | 182 | 'system1_baseboard.json', |
Chris Cain | cb47a83 | 2023-11-17 12:19:20 -0600 | [diff] [blame] | 183 | 'system1_chassis.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 184 | 'solum_pssf162202_psu.json', |
| 185 | 'storm_king.json', |
| 186 | 'stp_baseboard.json', |
| 187 | 'stp_p4000_chassis.json', |
Delphine CC Chiu | 4a2b287 | 2024-06-07 18:18:12 +0800 | [diff] [blame] | 188 | 'terminus_2x100g_nic_tsff.json', |
Matt Spinler | 43b6b19 | 2024-01-17 11:26:10 -0600 | [diff] [blame] | 189 | 'tola.json', |
Jayashree Dhanapal | 10612f3 | 2022-11-02 16:12:41 +0530 | [diff] [blame] | 190 | 'twinlake.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 191 | 'tyan_s7106_baseboard.json', |
| 192 | 'tyan_s8036_baseboard.json', |
Andrei Kartashev | 9d45552 | 2022-01-11 13:27:29 +0300 | [diff] [blame] | 193 | 'vegman_n110_baseboard.json', |
| 194 | 'vegman_rx20_baseboard.json', |
| 195 | 'vegman_sx20_baseboard.json', |
Brad Bishop | f4b2e5a | 2022-05-26 16:17:12 -0400 | [diff] [blame] | 196 | 'wft_baseboard.json', |
Delphine CC Chiu | aa702ea | 2024-04-29 12:46:19 +0800 | [diff] [blame] | 197 | 'yosemite4_fanboard_adc_ti.json', |
| 198 | 'yosemite4_fanboard_fsc_max_adc_ti.json', |
| 199 | 'yosemite4_fanboard_fsc_max.json', |
| 200 | 'yosemite4_fanboard_fsc_nct.json', |
Delphine CC Chiu | 4a1eed8 | 2024-06-28 16:51:30 +0800 | [diff] [blame] | 201 | 'yosemite4_sentineldome_t1.json', |
| 202 | 'yosemite4_sentineldome_t2.json', |
Delphine CC Chiu | e41b5cb | 2023-11-30 16:13:52 +0800 | [diff] [blame] | 203 | 'yosemite4_floatingfalls.json', |
| 204 | 'yosemite4_wailuafalls.json', |
Delphine CC Chiu | 82e6a3f | 2023-08-08 17:42:59 +0800 | [diff] [blame] | 205 | 'yosemite4.json', |
Tim Lee | b0750a0 | 2024-06-27 10:33:34 +0800 | [diff] [blame] | 206 | 'yosemite4n.json', |
Delphine CC Chiu | 82e6a3f | 2023-08-08 17:42:59 +0800 | [diff] [blame] | 207 | 'yosemite4_medusaboard.json', |
| 208 | 'yosemite4_spiderboard.json', |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 209 | ] |
Ed Tanous | 9dc2cc5 | 2021-12-20 16:05:49 -0800 | [diff] [blame] | 210 | filepaths = [] |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 211 | foreach c : configs |
Ed Tanous | 9dc2cc5 | 2021-12-20 16:05:49 -0800 | [diff] [blame] | 212 | file = join_paths('configurations', c) |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 213 | install_data( |
Ed Tanous | 9dc2cc5 | 2021-12-20 16:05:49 -0800 | [diff] [blame] | 214 | file, |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 215 | install_dir: join_paths( |
| 216 | packagedir, |
| 217 | 'configurations', |
| 218 | ) |
| 219 | ) |
Ed Tanous | 9dc2cc5 | 2021-12-20 16:05:49 -0800 | [diff] [blame] | 220 | filepaths += [file] |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 221 | endforeach |
| 222 | |
Matt Spinler | 7742c87 | 2024-05-02 14:13:21 -0500 | [diff] [blame] | 223 | if get_option('validate-json') |
| 224 | validate_script = files('scripts/validate_configs.py') |
| 225 | autojson = custom_target( |
| 226 | 'check_syntax', |
| 227 | command: [ |
| 228 | validate_script, |
| 229 | '-v', |
| 230 | '-k', |
| 231 | ], |
| 232 | depend_files: files(filepaths), |
| 233 | build_by_default: true, |
| 234 | capture: true, |
| 235 | output: 'validate_configs.log', |
| 236 | ) |
| 237 | endif |
Ed Tanous | 9dc2cc5 | 2021-12-20 16:05:49 -0800 | [diff] [blame] | 238 | |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 239 | schemas = [ |
| 240 | 'global.json', |
Brad Bishop | 6666588 | 2020-05-07 17:05:18 -0400 | [diff] [blame] | 241 | 'legacy.json', |
Brad Bishop | b980991 | 2020-05-07 17:15:31 -0400 | [diff] [blame] | 242 | 'openbmc-dbus.json', |
Brad Bishop | 7d05ee5 | 2022-05-26 16:27:48 -0400 | [diff] [blame] | 243 | 'ibm.json', |
| 244 | 'intel.json', |
| 245 | 'pid.json', |
| 246 | 'pid_zone.json', |
| 247 | 'stepwise.json', |
| 248 | 'virtual_sensor.json', |
Andrew Geissler | 48edf9a | 2023-02-21 10:44:14 -0600 | [diff] [blame] | 249 | 'satellite_controller.json', |
Brad Bishop | b445991 | 2019-11-05 19:39:11 -0500 | [diff] [blame] | 250 | ] |
| 251 | |
| 252 | foreach s : schemas |
| 253 | install_data( |
| 254 | join_paths('schemas', s), |
| 255 | install_dir: join_paths( |
| 256 | packagedir, |
| 257 | 'configurations', |
| 258 | 'schemas', |
| 259 | ) |
| 260 | ) |
| 261 | endforeach |
| 262 | |
| 263 | subdir('service_files') |
| 264 | subdir('src') |
Brad Bishop | b9f50cd | 2020-10-14 09:54:58 -0400 | [diff] [blame] | 265 | |
Jason M. Bills | ff58eba | 2020-04-14 16:05:30 -0700 | [diff] [blame] | 266 | if not build_tests.disabled() |
Patrick Venture | a62466c | 2021-02-08 14:55:18 -0800 | [diff] [blame] | 267 | test_boost_args = boost_args + ['-DBOOST_ASIO_DISABLE_THREADS'] |
Brad Bishop | b9f50cd | 2020-10-14 09:54:58 -0400 | [diff] [blame] | 268 | gtest = dependency('gtest', main: true, disabler: true, required: false) |
Benjamin Fair | f2f5b7a | 2022-09-09 19:45:02 +0000 | [diff] [blame] | 269 | gmock = dependency('gmock', disabler: true, required: false) |
| 270 | if not (gtest.found() and gmock.found()) and build_tests.enabled() |
Ed Tanous | 55ae5a8 | 2021-08-02 14:00:02 -0700 | [diff] [blame] | 271 | cmake = import('cmake') |
Brad Bishop | b9f50cd | 2020-10-14 09:54:58 -0400 | [diff] [blame] | 272 | gtest_subproject = cmake.subproject('gtest') |
| 273 | cm_gtest = gtest_subproject.dependency('gtest') |
| 274 | cm_gtest_main = gtest_subproject.dependency('gtest_main') |
| 275 | gtest = declare_dependency(dependencies: [cm_gtest, cm_gtest_main, threads]) |
Benjamin Fair | f2f5b7a | 2022-09-09 19:45:02 +0000 | [diff] [blame] | 276 | gmock = gtest_subproject.dependency('gmock') |
| 277 | |
Brad Bishop | b9f50cd | 2020-10-14 09:54:58 -0400 | [diff] [blame] | 278 | endif |
| 279 | |
| 280 | test( |
| 281 | 'test_entity_manager', |
| 282 | executable( |
| 283 | 'test_entity_manager', |
| 284 | 'test/test_entity-manager.cpp', |
Brad Bishop | e45d8c7 | 2022-05-25 15:12:53 -0400 | [diff] [blame] | 285 | 'src/expression.cpp', |
| 286 | 'src/utils.cpp', |
Patrick Venture | a62466c | 2021-02-08 14:55:18 -0800 | [diff] [blame] | 287 | cpp_args: test_boost_args, |
Brad Bishop | b9f50cd | 2020-10-14 09:54:58 -0400 | [diff] [blame] | 288 | dependencies: [ |
| 289 | boost, |
| 290 | gtest, |
Andrew Jeffery | 14a7bc9 | 2021-08-02 10:01:22 +0930 | [diff] [blame] | 291 | nlohmann_json_dep, |
Brad Bishop | b9f50cd | 2020-10-14 09:54:58 -0400 | [diff] [blame] | 292 | sdbusplus, |
| 293 | valijson, |
| 294 | ], |
Andrew Jeffery | a5d25dc | 2023-01-27 12:28:22 +1030 | [diff] [blame] | 295 | include_directories: 'src', |
Brad Bishop | b9f50cd | 2020-10-14 09:54:58 -0400 | [diff] [blame] | 296 | ) |
| 297 | ) |
Patrick Venture | a62466c | 2021-02-08 14:55:18 -0800 | [diff] [blame] | 298 | |
| 299 | test( |
| 300 | 'test_fru_utils', |
| 301 | executable( |
| 302 | 'test_fru_utils', |
| 303 | 'test/test_fru-utils.cpp', |
Brad Bishop | e45d8c7 | 2022-05-25 15:12:53 -0400 | [diff] [blame] | 304 | 'src/fru_utils.cpp', |
Zev Weiss | 309c0b1 | 2022-02-25 01:44:12 +0000 | [diff] [blame] | 305 | 'src/fru_reader.cpp', |
Patrick Venture | a62466c | 2021-02-08 14:55:18 -0800 | [diff] [blame] | 306 | cpp_args: test_boost_args, |
| 307 | dependencies: [ |
| 308 | boost, |
| 309 | gtest, |
Andrew Jeffery | 5bda182 | 2023-01-27 13:40:21 +1030 | [diff] [blame] | 310 | sdbusplus, |
Patrick Venture | a62466c | 2021-02-08 14:55:18 -0800 | [diff] [blame] | 311 | ], |
Andrew Jeffery | a5d25dc | 2023-01-27 12:28:22 +1030 | [diff] [blame] | 312 | include_directories: 'src', |
Patrick Venture | a62466c | 2021-02-08 14:55:18 -0800 | [diff] [blame] | 313 | ) |
| 314 | ) |
Benjamin Fair | f2f5b7a | 2022-09-09 19:45:02 +0000 | [diff] [blame] | 315 | |
| 316 | test( |
| 317 | 'test_topology', |
| 318 | executable( |
| 319 | 'test_topology', |
| 320 | 'test/test_topology.cpp', |
| 321 | 'src/topology.cpp', |
| 322 | cpp_args: test_boost_args, |
| 323 | dependencies: [ |
| 324 | gtest, |
| 325 | gmock, |
Patrick Williams | af29361 | 2023-04-19 10:27:37 -0500 | [diff] [blame] | 326 | nlohmann_json_dep, |
Benjamin Fair | f2f5b7a | 2022-09-09 19:45:02 +0000 | [diff] [blame] | 327 | ], |
Andrew Jeffery | a5d25dc | 2023-01-27 12:28:22 +1030 | [diff] [blame] | 328 | include_directories: 'src', |
Benjamin Fair | f2f5b7a | 2022-09-09 19:45:02 +0000 | [diff] [blame] | 329 | ) |
| 330 | ) |
Jason M. Bills | ff58eba | 2020-04-14 16:05:30 -0700 | [diff] [blame] | 331 | endif |