Skip to content

Add no range check option to target #643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion config/DefaultFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
CMAKE_Fortran_FLAGS_INIT
"-fimplicit-none"
"-ffree-line-length-132"
"-fno-range-check"
)
set(
CMAKE_Fortran_FLAGS_RELEASE_INIT
Expand Down
8 changes: 8 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ set(SRC

add_library(${PROJECT_NAME} ${SRC})

if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0)
target_compile_options(
${PROJECT_NAME}
PRIVATE
-fno-range-check
)
endif()

set(LIB_MOD_DIR ${CMAKE_CURRENT_BINARY_DIR}/mod_files/)
# We need the module directory before we finish the configure stage since the
# build interface might resolve before the module directory is generated by CMake
Expand Down