eyalroz / cuda-kat

CUDA kernel author's tools
BSD 3-Clause "New" or "Revised" License
104 stars 8 forks source link

Place export set in build directory #83

Open codecircuit opened 3 years ago

codecircuit commented 3 years ago

If you put these lines:

# If you want to use the library without installing it, you'll need to
# copy the file we generate here, cuda-kat-config.cmake, into the
# build directory, and set `cuda-kat_DIR` to that build directory
# in your own CMake project.
export(
    EXPORT cuda-kat_export
    NAMESPACE "cuda-kat::"
    FILE "${PROJECT_BINARY_DIR}/cuda-kat-config.cmake"
)

In the CMakeLists.txt here it is possible to use this project without installing it. This feature is also available for the cuda-api-wrappers.

eyalroz commented 3 years ago

This makes me wonder... if we generate the file in ${CMAKE_CURRENT_BINARY_DIR} - why do we even need to copy it anywhere?