Issue |
146344
|
Summary |
Incorrect usage of variable in CMakeLists.txt
|
Labels |
new issue
|
Assignees |
|
Reporter |
x12301450
|
In mlir/lib/Target/LLVM/CMakeLists.txt, the variable `CUDAToolkit_LIBRARY_ROOT` is used in the following way in Line 66:
`set(MLIR_CUDAToolkit_ROOT ${CUDAToolkit_LIBRARY_ROOT})`
and like this in Line 135:
```
find_file(MLIR_NVVM_LIBDEVICE_PATH libdevice.10.bc
PATHS ${CUDAToolkit_LIBRARY_ROOT}
PATH_SUFFIXES "nvvm/libdevice" NO_DEFAULT_PATH REQUIRED)
```
However, when checking whether the variable is defined, it is done in the following way in Line 62:
`if(NOT DEFINED ${CUDAToolkit_LIBRARY_ROOT})`
This `if` command doesn't take effect when `CUDAToolkit_LIBRARY_ROOT` simply represent a path. I think the correct way to write it should be:
`if(NOT DEFINED CUDAToolkit_LIBRARY_ROOT)`
Looking forward to your feedback!
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs