Skip to content

Print better error message when cuda driver library is not found by CMake #1363

@eyalroz

Description

@eyalroz

After getting past other build issues with ArrayFire v3.3.1, I get:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_CUDA_LIBRARY (ADVANCED)
    linked by target "afcuda" in directory /ufs/eyalroz/src/arrayfire-full-3.3.1/src/backend/cuda
    linked by target "write_cuda" in directory /ufs/eyalroz/src/arrayfire-full-3.3.1/test
    etc. etc.

If I add the following snippet to CMakeLists.txt:

    IF(NOT "$ENV{CUDA_CUDA_LIBRARY}" STREQUAL "")
      SET(CUDA_CUDA_LIBRARY $ENV{CUDA_CUDA_LIBRARY})
    ENDIF(NOT "$ENV{CUDA_CUDA_LIBRARY}" STREQUAL "")

and do export CUDA_CUDA_LIBRARY=/path/to/cuda/lib64/libcudart.so, then CMake happily (?) continues beyond this point. But that's not quite a solution...

PS - Sorry about filing lots of bugs on the same day... think about it as free QA on Fedora :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions