Skip to content

Commit

Permalink
Merge branch 'develop' into spack_update_jan2024
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA authored Jan 25, 2024
2 parents cf5ae3a + 5aa4807 commit 4a42067
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,24 @@ if(BUILD_DEPRECATED)
sptgpsd.f sptgptd.f sptgptsd.f sptgptvd.f sptrund.f sptrunl.f spvar.f)
endif()

set_source_files_properties(fftpack.F PROPERTIES COMPILE_FLAGS -fcheck=no-bounds)
set_source_files_properties(sptranf.f PROPERTIES COMPILE_FLAGS -fcheck=no-bounds)
set_source_files_properties(sptranfv.f PROPERTIES COMPILE_FLAGS -fcheck=no-bounds)
# Set compiler flags.
if(CMAKE_BUILD_TYPE MATCHES "Debug")
# Bounds checking is turned on for all files for the "Debug" build in the
# main CMakeLists.txt.
# Need to turn off bounds checking for fftpack.F, sptranf.f, and sptranfv.f
# in order to pass tests.
foreach(filename fftpack.F sptranf.f sptranfv.f)
if(CMAKE_Fortran_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set_source_files_properties(${filename} PROPERTIES COMPILE_FLAGS -check=nobounds)
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "^(GNU)$")
if(${CMAKE_Fortran_COMPILER_VERSION} VERSION_GREATER_EQUAL 6)
set_source_files_properties(${filename} PROPERTIES COMPILE_FLAGS -fcheck=no-bounds)
else()
set_source_files_properties(${filename} PROPERTIES COMPILE_FLAGS -fno-bounds-check)
endif()
endif()
endforeach()
endif()

# Build _4, _d, and/or _8 depending on options provided to CMake
foreach(kind ${kinds})
Expand Down

0 comments on commit 4a42067

Please sign in to comment.