File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1010# or submit itself to any jurisdiction.
1111
1212# NOTE!!!! - Whenever this file is changed, move it over to alidist/resources
13- # FindO2GPU.cmake Version 1
13+ # FindO2GPU.cmake Version 2
1414
1515if (NOT DEFINED ENABLE_CUDA)
1616 set (ENABLE_CUDA "AUTO" )
@@ -125,6 +125,8 @@ if(ENABLE_CUDA)
125125 if (GPUCA_CUDA_GCCBIN)
126126 message (STATUS "Using as CUDA GCC version: ${GPUCA_CUDA_GCCBIN} " )
127127 set (CMAKE_CUDA_HOST_COMPILER "${GPUCA_CUDA_GCCBIN} " )
128+ elseif (DEFINED ENV{GCC_TOOLCHAIN_ROOT})
129+ set (CMAKE_CUDA_HOST_COMPILER "$ENV{GCC_TOOLCHAIN_ROOT} /bin/gcc" )
128130 endif ()
129131 enable_language (CUDA)
130132 get_property (LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES )
@@ -278,6 +280,12 @@ if(ENABLE_HIP)
278280 endif ()
279281 endif ()
280282 if (CMAKE_HIP_COMPILER)
283+ if (GPUCA_HIP_GCCBIN)
284+ message (STATUS "Using as HIP GCC version: ${GPUCA_HIP_GCCBIN} " )
285+ set (CMAKE_HIP_HOST_COMPILER "${GPUCA_HIP_GCCBIN} " )
286+ elseif (DEFINED ENV{GCC_TOOLCHAIN_ROOT})
287+ set (CMAKE_HIP_HOST_COMPILER "$ENV{GCC_TOOLCHAIN_ROOT} /bin/gcc" )
288+ endif ()
281289 enable_language (HIP)
282290 message (STATUS "HIP language enabled: ${CMAKE_HIP_COMPILER} " )
283291 endif ()
You can’t perform that action at this time.
0 commit comments