Allow building with missing beast/mongoose if web server is disabled.#1308
Conversation
Signed-off-by: Michael Medin <michael@medin.name>
e28e673 to
b051961
Compare
There was a problem hiding this comment.
Pull request overview
This PR adjusts the CMake build so missing web-backend dependencies (mongoose source or OpenSSL for Boost.Beast) don’t break configuration unless the WEBServer module is actually being built, by conditionally skipping the nscp_mongoose library and related tests.
Changes:
- Add
NSCP_MONGOOSE_AVAILABLEindependencies.cmakeand downgrade missing-backend handling fromFATAL_ERRORtoSTATUS. - Skip building
libs/mongoose-cpp(and its wrapper tests) when backend dependencies are unavailable; emit a targetedFATAL_ERRORonly when building theWEBServermodule withoutnscp_mongoose. - Remove unused
ALL_LIB_NAMESaccumulation from the top-levelCMakeLists.txt.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
build/cmake/dependencies.cmake |
Introduces NSCP_MONGOOSE_AVAILABLE and makes missing web deps non-fatal at configure time. |
libs/mongoose-cpp/CMakeLists.txt |
Skips creating the nscp_mongoose target when the selected backend is unavailable; validates backend selector. |
modules/WEBServer/CMakeLists.txt |
Fails early with a clear message if WEBServer is enabled but nscp_mongoose wasn’t built. |
tests/CMakeLists.txt |
Skips mongoose wrapper tests when nscp_mongoose target doesn’t exist. |
CMakeLists.txt |
Removes unused ALL_LIB_NAMES variable tracking during libs enumeration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ability Signed-off-by: Michael Medin <michael@medin.name>
|
I'm testing now and with -DBUILD_MODULE_WEBServer=OFF and -DNSCP_WEB_BACKEND=mongoose (default) don't build the webserver part but if in future will be -DNSCP_WEB_BACKEND=beast the default with boost and openssl installed will build even if -DBUILD_MODULE_WEBServer=OFF, or I'm wrong? |
No description provided.