KhronosGroup / KhronosGroup/OpenCL-CLHPP
Default values for options BUILD_EXAMPLES and BUILD_DOCS
- Dominant language
- C++
- Stars
- 425
- Forks
- 133
- Avg merge
- 3h 30m
- Merged PRs (30d)
- 1
Description
The following describes a discrepancy in the CMake scripts of the OpenCL-CLHPP project:
- The test suite is configured to build only if it is explicitly enabled via `BUILD_TESTING` and if the current project is the root CMake project (or if the project specific `OPENCL_CLHPP_BUILD_TESTING` option is set).
- This above is beneficial when the project is consumed by an other project, e.g. via FetchContent, because the test targets are not added. It is unlikely that the parent project is interested in running the tests of the dependent project, but still possible via the aforementioned cache variable.
- The same logic is not applied to the `BUILD_EXAMPLES` and `BUILD_DOCS` options, even though they are also likely to be unneeded by the parent project.
- An additional downside is that the current setup poses additional dependency requirements on the parent project (both the docs and the examples have a few, albeit the docs will not fail the configuration if Doxygen is not found).
- It should be considered to add the same logic to `BUILD_EXAMPLES` and `BUILD_DOCS` as seen with the `BUILD_TESTING` option.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the CMake scripts that define BUILD_TESTING, OPENCL_CLHPP_BUILD_TESTING, BUILD_EXAMPLES, and BUILD_DOCS, then compare how test configuration is gated for root versus dependency projects. Done means examples and documentation follow the same conditional logic without adding unnecessary parent-project dependencies; verify with the project's CMake configuration paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100