SIGN IN SIGN UP

remove #ifdef preprocessor usage

Using the preprocessor is not necessary for led-manager use-cases and
prevents static analysis since only 1 configuration is built in our CI.

Replace `conf.set` with `conf.set10` [1] to #define symbols for
configuration options so we can branch on them.

Also refactor a few object constructions to avoid changing their scope.

Inspecting `build/config.h`:

Before:
```
...
 #undef MONITOR_OPERATIONAL_STATUS
 #define PERSISTENT_LED_ASSERTED
 #define SAVED_GROUPS_FILE "/var/lib/phosphor-led-manager/savedGroups"
 #define USE_LAMP_TEST
```

After:
```
...
 #define MONITOR_OPERATIONAL_STATUS 0
 #define PERSISTENT_LED_ASSERTED 1
 #define SAVED_GROUPS_FILE "/var/lib/phosphor-led-manager/savedGroups"
 #define USE_LAMP_TEST 1
```

Replace `#ifdef` with `if constexpr`.

Tested: on Tyan S8030

led-manager parses its configuration and populates it's DBus interfaces.
Logs show no errors.

```
root@s8030-bmc-30303035c0c1:~# busctl tree xyz.openbmc_project.LED.GroupManager
`- /xyz
  `- /xyz/openbmc_project
    `- /xyz/openbmc_project/led
      `- /xyz/openbmc_project/led/groups
        |- /xyz/openbmc_project/led/groups/bmc_booted
        |- /xyz/openbmc_project/led/groups/enclosure_fault
        |- /xyz/openbmc_project/led/groups/enclosure_identify
        `- /xyz/openbmc_project/led/groups/power_on
root@s8030-bmc-30303035c0c1:~# busctl introspect xyz.openbmc_project.LED.GroupManager /xyz/openbmc_project/led/groups/enclosure_identify
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface -         -            -
.Introspect                         method    -         s            -
org.freedesktop.DBus.Peer           interface -         -            -
.GetMachineId                       method    -         s            -
.Ping                               method    -         -            -
org.freedesktop.DBus.Properties     interface -         -            -
.Get                                method    ss        v            -
.GetAll                             method    s         a{sv}        -
.Set                                method    ssv       -            -
.PropertiesChanged                  signal    sa{sv}as  -            -
xyz.openbmc_project.Led.Group       interface -         -            -
.Asserted                           property  b         false        emits-change writable
root@s8030-bmc-30303035c0c1:~# journalctl -u xyz.openbmc_project.LED.GroupManager
Apr 03 20:35:38 s8030 systemd[1]: Starting Phosphor LED Group Management Daemon...
Apr 03 20:35:52 s8030 systemd[1]: Started Phosphor LED Group Management Daemon.
```

Asserting the LED Group is successful

```
root@s8030-bmc-30303035c0c1:~# busctl introspect xyz.openbmc_project.LED.GroupManager /xyz/openbmc_project/led/groups/enclosure_identify
NAME                                TYPE      SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface -         -            -
.Introspect                         method    -         s            -
org.freedesktop.DBus.Peer           interface -         -            -
.GetMachineId                       method    -         s            -
.Ping                               method    -         -            -
org.freedesktop.DBus.Properties     interface -         -            -
.Get                                method    ss        v            -
.GetAll                             method    s         a{sv}        -
.Set                                method    ssv       -            -
.PropertiesChanged                  signal    sa{sv}as  -            -
xyz.openbmc_project.Led.Group       interface -         -            -
.Asserted                           property  b         true         emits-change writable
```

References:

[1] https://mesonbuild.com/Reference-manual_returned_cfg_data.html#cfg_dataset10

Change-Id: If881144123f313ed7be7e5ccd20ddf51c2e3ac34
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
A
Alexander Hansen committed
68e204c6154634830c9f435ada5bd8c381539dcc
Parent: b3c7d37
Committed by Patrick Williams <patrick@stwcx.xyz> on 1/7/2026, 6:05:52 PM