Skip to content

Commit 50a1d08

Browse files
authored
Minimal set of changes to enable building with LLVM flang. (#198)
1 parent 7b414a4 commit 50a1d08

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,15 @@ ENDIF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F08)
107107
#OPTION(USE_MPI "Use the MPI library for parallelization" OFF)
108108
#OPTION(USE_OPENMP "Use OpenMP for parallelization" OFF)
109109

110-
IF(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
110+
IF(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")
111111
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS}")
112-
ELSE(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
112+
ELSE(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")
113113
IF(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
114114
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS} -std=f2008")
115115
ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
116116
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS} -std=f2003")
117117
ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
118-
ENDIF(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
118+
ENDIF(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")
119119

120120
# Set compile flags for DEBUG, # RELEASE, or TESTING.
121121
INCLUDE(${CMAKE_MODULE_PATH}/SetFortranFlags.cmake)

lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ if(HIP_PLATFORM STREQUAL "amd")
196196

197197
find_package(hipsparse PATHS ${ROCM_PATH} /opt/rocm)
198198
if(hipsparse_FOUND)
199-
hipfort_add_component(hipsparse hip::hipsparse)
199+
hipfort_add_component(hipsparse roc::hipsparse)
200200
else()
201201
message(STATUS "Skipping hipfort::hipsparse target export")
202202
endif()

0 commit comments

Comments
 (0)