mosquitto
mosquitto copied to clipboard
Rename DOCUMENTATION option to WITH_DOCS in CMakeLists.txt
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
DOCUMENTATIONoption - config.mk: Uses
WITH_DOCSvariable - 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
- Renamed
option(DOCUMENTATION ...)tooption(WITH_DOCS ...) - Updated all references:
if (DOCUMENTATION)→if (WITH_DOCS) - 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
@jacmet @xrmx @onip @ncopa Please get a chance to review this small PR.