KhronosGroup / KhronosGroup/OpenCL-SDK
FetchContent dependency conflict.
- Dominant language
- C++
- Stars
- 777
- Forks
- 163
- Avg merge
- 6d 17h
- Merged PRs (30d)
- 2
Description
FetchContent download package into CMAKE_BINARY_DIR. Therefore, dependencies, for example TCLAP, downloaded in wrong dir. To correct it, (for cmake/Dependencies/TCLAP/TCLAP.cmake) this command
```
FetchContent_Declare(
tclap-external
GIT_REPOSITORY https://github.com/mirror/tclap.git
GIT_TAG v1.2.5 # 58c5c8ef24111072fc21fb723f8ab45d23395809
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-src/CMakeLists.txt"
)
```
could be modified to
```
FetchContent_Declare(
tclap-external
GIT_REPOSITORY https://github.com/mirror/tclap.git
GIT_TAG v1.2.5 # 58c5c8ef24111072fc21fb723f8ab45d23395809
SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-src
SUBBUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-subbuild
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-build
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" "${CMAKE_CURRENT_BINARY_DIR}/_deps/tclap-external-src/CMakeLists.txt"
)
```
and simillary to other dependencies
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with cmake/Dependencies/TCLAP/TCLAP.cmake and inspect the corresponding FetchContent declarations for the other dependencies. Compare their source, subbuild, and binary directory handling, then configure the OpenCL-SDK and verify that dependencies are downloaded into the intended build subdirectories without conflicts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100