File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,14 +100,23 @@ check_fortran_compiler_flag("-Mrecursive" _MrecursiveFlag)
100100
101101# Add recursive flag
102102if (_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 ()
105108elseif (_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 ()
108114elseif (_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 ()
111120endif ()
112121
113122if (UNIX )
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ cleanobj:
157157cleanexe :
158158 rm -f xeigtst*
159159
160- FFLAGS_DRV_NORECURSIVE := $(filter-out -frecursive -Mrecursive,$(FFLAGS_DRV ) )
160+ FFLAGS_DRV_NORECURSIVE := $(filter-out -frecursive -Mrecursive -recursive ,$(FFLAGS_DRV ) )
161161
162162schkee.o : schkee.f
163163 $(FC ) $(FFLAGS_DRV ) -c -o $@ $<
You can’t perform that action at this time.
0 commit comments