eclipse-wakaama / wakaama

Eclipse Wakaama is a C implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
BSD 3-Clause "New" or "Revised" License
498 stars 374 forks source link

cmake: Allow client related settings from CMake #786

Closed LukasWoodtli closed 3 months ago

LukasWoodtli commented 3 months ago

The settings for "Client Initiated Bootstrap" and restriction to LwM2M version 1.0 can be now set with CMake options. These options are only available if the client mode is enabled.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

mlasch commented 3 months ago

I tried to build the client with -DWAKAAMA_CLIENT_LWM2M_V_1_0=ON and got a build error.

/home/marc/repos/wakaama/eclipse-wakaama/data/senml_json.c:30:2: error: #error SenML JSON not supported with LWM2M 1.0
   30 | #error SenML JSON not supported with LWM2M 1.0
      |  ^~~~~

This makes sense, maybe SenML JSON should be disabled for the client when forcing LwM2M 1.0?

LukasWoodtli commented 3 months ago

I tried to build the client with -DWAKAAMA_CLIENT_LWM2M_V_1_0=ON and got a build error.

/home/marc/repos/wakaama/eclipse-wakaama/data/senml_json.c:30:2: error: #error SenML JSON not supported with LWM2M 1.0
   30 | #error SenML JSON not supported with LWM2M 1.0
      |  ^~~~~

This makes sense, maybe SenML JSON should be disabled for the client when forcing LwM2M 1.0?

This didn't work before. We just did not have any example or test that combines client version 1.0 with SenML JSON.

We should add more checks to the CMake projects to disallow certain configuration combinations. But for that we need a clean CMake project first.