Skip to content

Commit

Permalink
Minimal set of changes to enable building with LLVM flang. (#198)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcornille authored Nov 9, 2024
1 parent 7b414a4 commit 50a1d08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ ENDIF(NOT DEFINED CMAKE_Fortran_COMPILER_SUPPORTS_F08)
#OPTION(USE_MPI "Use the MPI library for parallelization" OFF)
#OPTION(USE_OPENMP "Use OpenMP for parallelization" OFF)

IF(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
IF(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS}")
ELSE(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
ELSE(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")
IF(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS} -std=f2008")
ELSE(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS} -std=f2003")
ENDIF(CMAKE_Fortran_COMPILER_SUPPORTS_F08)
ENDIF(CMAKE_Fortran_COMPILER_ID MATCHES "Cray")
ENDIF(CMAKE_Fortran_COMPILER_ID MATCHES "(Cray|LLVMFlang)")

# Set compile flags for DEBUG, # RELEASE, or TESTING.
INCLUDE(${CMAKE_MODULE_PATH}/SetFortranFlags.cmake)
Expand Down
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ if(HIP_PLATFORM STREQUAL "amd")

find_package(hipsparse PATHS ${ROCM_PATH} /opt/rocm)
if(hipsparse_FOUND)
hipfort_add_component(hipsparse hip::hipsparse)
hipfort_add_component(hipsparse roc::hipsparse)
else()
message(STATUS "Skipping hipfort::hipsparse target export")
endif()
Expand Down

0 comments on commit 50a1d08

Please sign in to comment.