File tree Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Expand file tree Collapse file tree 4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
3
3
CMAKE_Fortran_FLAGS_INIT
4
4
"-fimplicit-none"
5
5
"-ffree-line-length-132"
6
- "-fno-range-check"
7
6
)
8
7
set (
9
8
CMAKE_Fortran_FLAGS_RELEASE_INIT
Original file line number Diff line number Diff line change @@ -94,6 +94,14 @@ set(SRC
94
94
95
95
add_library (${PROJECT_NAME} ${SRC} )
96
96
97
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0 )
98
+ target_compile_options (
99
+ ${PROJECT_NAME}
100
+ PRIVATE
101
+ $< $< COMPILE_LANGUAGE:Fortran> :-fno-range-check>
102
+ )
103
+ endif ()
104
+
97
105
set (LIB_MOD_DIR ${CMAKE_CURRENT_BINARY_DIR} /mod_files/ )
98
106
# We need the module directory before we finish the configure stage since the
99
107
# build interface might resolve before the module directory is generated by CMake
Original file line number Diff line number Diff line change @@ -17,3 +17,10 @@ target_sources(
17
17
if (CMAKE_Fortran_COMPILER_ID MATCHES "^Intel" )
18
18
set_target_properties (test_hash_functions PROPERTIES LINKER_LANGUAGE Fortran )
19
19
endif ()
20
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0 )
21
+ target_compile_options (
22
+ test_hash_functions
23
+ PRIVATE
24
+ $< $< COMPILE_LANGUAGE:Fortran> :-fno-range-check>
25
+ )
26
+ endif ()
Original file line number Diff line number Diff line change 1
1
ADDTEST (32_bit_hash_performance )
2
2
ADDTEST (64_bit_hash_performance )
3
+
4
+ if (CMAKE_Fortran_COMPILER_ID STREQUAL GNU AND CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 10.0 )
5
+ target_compile_options (
6
+ test_64_bit_hash_performance
7
+ PRIVATE
8
+ $< $< COMPILE_LANGUAGE:Fortran> :-fno-range-check>
9
+ )
10
+ endif ()
You can’t perform that action at this time.
0 commit comments