Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to disable docs when building #144

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

mjcarroll
Copy link
Contributor

@mjcarroll mjcarroll commented Jan 8, 2021

Currently we rebuild documentation on every build. This adds an option to disable this (default is enabled). This is helpful for development environments with repeated builds.

It can be set via colcon's cmake-args

colcon build --cmake-args -DBUILD_DOCS=OFF

Or via a defaults.yaml file:

{
  "build": {
    "merge-install": true,
    "symlink-install": true,
    "cmake-args": [
      "--no-warn-unused-cli",
      "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache",
      "-DCMAKE_EXPORT_COMPILE_COMMANDS=1",
      "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
      "-DBUILD_DOCS=OFF",
    ]
  }
}

Signed-off-by: Michael Carroll [email protected]

@mjcarroll mjcarroll requested a review from mxgrey as a code owner January 8, 2021 22:14
@github-actions github-actions bot added 🏢 edifice Ignition Edifice 🏰 citadel Ignition Citadel 📜 blueprint Ignition Blueprint 🔮 dome Ignition Dome labels Jan 8, 2021
@mjcarroll
Copy link
Contributor Author

As an example, I used a simple workspace with cmake2, common3, and math6:

  • With Docs:
    • Fresh build: 140 seconds
    • Rebuild: 4.17 seconds
  • Without Docs:
    • Fresh build: 139 seconds
    • Rebuild: 0.67 seconds
  • Without Docs + CCache (clear cache):
    • Fresh build: 140 seconds
    • Rebuild: 0.67 seconds
  • Without Docs + CCache (warm cache):
    • Fresh build: 25.9 seconds
    • Rebuild: 0.67 seconds

cmake/IgnCreateDocs.cmake Outdated Show resolved Hide resolved
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

We should document this somewhere visible. I'd recommend adding a tutorial to ign-cmake, but we first need to make sure that's deployed to the docs site (gazebosim/docs#53).

@mjcarroll
Copy link
Contributor Author

We should document this somewhere visible. I'd recommend adding a tutorial to ign-cmake

Added information in #145

@mjcarroll mjcarroll merged commit 522e7d4 into ign-cmake2 Jan 12, 2021
@mjcarroll mjcarroll deleted the optionally_disable_docs branch January 12, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📜 blueprint Ignition Blueprint 🏰 citadel Ignition Citadel 🔮 dome Ignition Dome 🏢 edifice Ignition Edifice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants