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

Fix building docs from subprojects by not using CMAKE_SOURCE_DIR #6016

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chewi
Copy link
Contributor

@chewi chewi commented Sep 20, 2024

The generate_documentation function currently uses CMAKE_SOURCE_DIR to find documentation assets at the SDK top-level, but when building from a subproject like sdk/core/azure-core, the variable points to that directory instead.

Fix this by defining SDK_ROOT_DIR, which is based on PROJECT_SOURCE_DIR. This should always work as long as each subproject calling the function is always 3 levels down, which is currently the case.

I've tested this against the whole SDK and when building 5 of the subprojects separately.

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.

  • C++ Guidelines -- N/A
  • Doxygen docs
  • Unit tests -- N/A
  • No unwanted commits/changes
  • Descriptive title/description
    • PR is single purpose
    • Related issue listed
  • Comments in source
  • No typos
  • Update changelog -- N/A
  • Not work-in-progress
  • External references or docs updated
  • Self review of PR done
  • Any breaking changes?

The generate_documentation function currently uses CMAKE_SOURCE_DIR to
find documentation assets at the SDK top-level, but when building from a
subproject like sdk/core/azure-core, the variable points to that
directory instead.

Fix this by defining SDK_ROOT_DIR, which is based on PROJECT_SOURCE_DIR.
This should always work as long as each subproject calling the function
is always 3 levels down, which is currently the case.
Copy link

Thank you for your contribution @chewi! We will review the pull request and get back to you soon.

@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant