CMake issue when mixing Fortran/c++
Closed this issue · 5 comments
I'm trying to build a library using roc::rocthrust. I have the following lines in my CMakeLists.txt
...
find_package(rocprim REQUIRED)
find_package(rocthrust REQUIRED)
...
target_link_libraries(strumpack PUBLIC roc::hipblas roc::rocblas roc::rocsolver roc::rocthrust)
The problem is that the roc::rocthrust target also adds flags to the fortran compilation commands:
gfortran: error: unrecognized command line option ‘--hip-device-lib-path=/opt/rocm-3.8.0/lib’
gfortran: error: unrecognized command line option ‘--cuda-gpu-arch=gfx900’
gfortran: error: unrecognized command line option ‘--cuda-gpu-arch=gfx906’
Thank you for reporting this issue. Apologies for the delay. I will take a look at getting this issue assigned internally.
Thank you!
It seems that with ROCm 3.9, I no longer need rocThrust since std::complex operations are natively supported in HIP kernels, is that correct?
I still have this issue with ROCm 3.10
Please see ROCm/HIP#2183.
That PR will resolve the Fortran cmake issues in a future release.
Resolved as per previous comment.