File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,23 @@ check_fortran_compiler_flag("-Mrecursive" _MrecursiveFlag)
100
100
101
101
# Add recursive flag
102
102
if (_recursiveFlag )
103
- set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -recursive" )
104
- # message(STATUS ${CMAKE_Fortran_FLAGS})
103
+ string (REGEX MATCH "-recursive" output_test <string> "${CMAKE_Fortran_FLAGS} " )
104
+ if (NOT output_test )
105
+ message (STATUS "Adding recursive flag to CMAKE_Fortran_FLAGS." )
106
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -recursive" )
107
+ endif ()
105
108
elseif (_frecursiveFlag )
106
- set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -frecursive" )
107
- # message(STATUS ${CMAKE_Fortran_FLAGS})
109
+ string (REGEX MATCH "-frecursive" output_test <string> "${CMAKE_Fortran_FLAGS} " )
110
+ if (NOT output_test )
111
+ message (STATUS "Adding recursive flag to CMAKE_Fortran_FLAGS." )
112
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -frecursive" )
113
+ endif ()
108
114
elseif (_MrecursiveFlag )
109
- set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mrecursive" )
110
- # message(STATUS ${CMAKE_Fortran_FLAGS})
115
+ string (REGEX MATCH "-Mrecursive" output_test <string> "${CMAKE_Fortran_FLAGS} " )
116
+ if (NOT output_test )
117
+ message (STATUS "Adding recursive flag to CMAKE_Fortran_FLAGS." )
118
+ set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Mrecursive" )
119
+ endif ()
111
120
endif ()
112
121
113
122
if (UNIX )
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ cleanobj:
157
157
cleanexe :
158
158
rm -f xeigtst*
159
159
160
- FFLAGS_DRV_NORECURSIVE := $(filter-out -frecursive -Mrecursive,$(FFLAGS_DRV ) )
160
+ FFLAGS_DRV_NORECURSIVE := $(filter-out -frecursive -Mrecursive -recursive ,$(FFLAGS_DRV ) )
161
161
162
162
schkee.o : schkee.f
163
163
$(FC ) $(FFLAGS_DRV ) -c -o $@ $<
You can’t perform that action at this time.
0 commit comments