OpenCL-SDK icon indicating copy to clipboard operation
OpenCL-SDK copied to clipboard

FetchContent dependency conflict.

Open SomePerson1111 opened this issue 2 years ago • 0 comments

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

SomePerson1111 avatar Apr 19 '24 11:04 SomePerson1111