Skip to content

Conversation

@ssam18
Copy link

@ssam18 ssam18 commented Dec 2, 2025

Problem

Fixes #3381

The CMakeLists.txt used DOCUMENTATION as the option name, while the README.md and config.mk consistently use WITH_DOCS. This naming inconsistency made it confusing for users who want to disable documentation building.

Current State

  • CMakeLists.txt: Uses DOCUMENTATION option
  • config.mk: Uses WITH_DOCS variable
  • README.md: Documents make WITH_DOCS=no

Solution

Rename the CMake option from DOCUMENTATION to WITH_DOCS to match the Makefile convention and maintain consistency across the build system.

Changes

  1. Renamed option(DOCUMENTATION ...) to option(WITH_DOCS ...)
  2. Updated all references: if (DOCUMENTATION)if (WITH_DOCS)
  3. Maintains consistency with other CMake options (WITH_CLIENTS, WITH_BROKER, WITH_APPS, WITH_PLUGINS)

Usage

Before:

cmake -DDOCUMENTATION=OFF ..

After:

cmake -DWITH_DOCS=OFF ..

Backward Compatibility

This is a breaking change for users who explicitly set -DDOCUMENTATION=OFF in their CMake commands. However:

  • The option was undocumented in README (which only mentions WITH_DOCS)
  • It aligns with the established WITH_* naming convention
  • Makes the build system more intuitive and consistent

Testing

  • Verified the diff shows correct renaming
  • Option maintains the same default value (ON)
  • No functional changes to the build process

The CMakeLists.txt used DOCUMENTATION as the option name, while the
README and config.mk use WITH_DOCS. This inconsistency made it confusing
for users.

Changes:
- Rename DOCUMENTATION option to WITH_DOCS to match Makefile convention
- Update all references to use WITH_DOCS consistently
- Maintains backward compatibility with other WITH_* options

Fixes eclipse-mosquitto#3381
@SamareshSingh
Copy link

@jacmet @xrmx @onip @ncopa Please get a chance to review this small PR.

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.

WITH_DOCS in cmake

2 participants