Skip to content

Commit

Permalink
correct FORTRAN_FLAGS options. For some reason hipfort_check was addi…
Browse files Browse the repository at this point in the history
…ng an unresolved ref to exit_ which should just be exit. So we add -fno_underscoring to the compilation of the libraries. Also, we moved the -ffree-line-length-none to the default value of HIPFORT_COMPILER_FLAGS which now is added to CMAKE_Fortran_FLAGS in the top level CMake. So no need to add this in lib/CMakeLists.txt
  • Loading branch information
gregrodgers committed Aug 27, 2020
1 parent aeea3cf commit 0b90b4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.0.2)
set(HIPFORT_COMPILER "/usr/bin/gfortran" CACHE STRING "Fortran Compiler to build HIPFORT")
set(HIPFORT_AR "/usr/bin/gcc-ar" CACHE STRING "Static archive command")
set(HIPFORT_RANLIB "/usr/bin/gcc-ranlib" CACHE STRING "ranlib used to create Static archive")
set(HIPFORT_COMPILER_FLAGS "-std=f2003 -ffree-form -cpp -ffree-line-length-512" CACHE STRING "Compiler flags to build HIPFORT")
set(HIPFORT_COMPILER_FLAGS "-std=f2003 -ffree-form -cpp -ffree-line-length-none" CACHE STRING "Compiler flags to build HIPFORT")
set(HIPFORT_BUILD_TYPE "RELEASE" CACHE STRING "Set to RELEASE TESTING or DEBUG")

# The ROCm release manager and other integrators should build hipfort as follows:
Expand Down Expand Up @@ -54,7 +54,7 @@ ENDIF(NOT CMAKE_Fortran_COMPILER_SUPPORTS_F90)
#OPTION(USE_OPENMP "Use OpenMP for parallelization" OFF)

# Allow long lines:
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -ffree-line-length-none")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${HIPFORT_COMPILER_FLAGS}")

# 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
@@ -1,5 +1,5 @@

set(CMAKE_Fortran_FLAGS "${HIPFORT_COMPILER_FLAGS} ${CMAKE_Fortran_FLAGS}")
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fno-underscoring")
file(GLOB HIPFORT_SRC_HIP "${CMAKE_CURRENT_SOURCE_DIR}/hipfort/*.f*")
#file(GLOB HIPFORT_SRC_amdgcn "${CMAKE_CURRENT_SOURCE_DIR}/modules-amdgcn/*.f*")
#file(GLOB HIPFORT_SRC_nvptx "${CMAKE_CURRENT_SOURCE_DIR}/modules-nvptx/*.f*")
Expand Down

0 comments on commit 0b90b4d

Please sign in to comment.