Skip to content

Allow building with missing beast/mongoose if web server is disabled.#1308

Merged
mickem merged 2 commits into
mainfrom
allow_building_without_webserver
Jun 5, 2026
Merged

Allow building with missing beast/mongoose if web server is disabled.#1308
mickem merged 2 commits into
mainfrom
allow_building_without_webserver

Conversation

@mickem
Copy link
Copy Markdown
Owner

@mickem mickem commented Jun 4, 2026

No description provided.

Signed-off-by: Michael Medin <michael@medin.name>
@mickem mickem force-pushed the allow_building_without_webserver branch from e28e673 to b051961 Compare June 4, 2026 05:10
@mickem mickem requested a review from Copilot June 5, 2026 01:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_AVAILABLE in dependencies.cmake and downgrade missing-backend handling from FATAL_ERROR to STATUS.
  • Skip building libs/mongoose-cpp (and its wrapper tests) when backend dependencies are unavailable; emit a targeted FATAL_ERROR only when building the WEBServer module without nscp_mongoose.
  • Remove unused ALL_LIB_NAMES accumulation from the top-level CMakeLists.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.

Comment thread build/cmake/dependencies.cmake
…ability

Signed-off-by: Michael Medin <michael@medin.name>
@mickem mickem merged commit 9355390 into main Jun 5, 2026
28 checks passed
@mickem mickem deleted the allow_building_without_webserver branch June 5, 2026 03:32
@Fantu
Copy link
Copy Markdown
Contributor

Fantu commented Jun 5, 2026

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants