|  | @@ -13,7 +13,7 @@
 | 
	
		
			
				|  |  |  #            Will be created as an internal cache variable.
 | 
	
		
			
				|  |  |  #
 | 
	
		
			
				|  |  |  # This internally calls the check_fortran_source_compiles macro and
 | 
	
		
			
				|  |  | -# sets CMAKE_REQUIRED_FLAGS to <flag>.  See help for
 | 
	
		
			
				|  |  | +# sets CMAKE_REQUIRED_DEFINITIONS to <flag>.  See help for
 | 
	
		
			
				|  |  |  # CheckFortranSourceCompiles for a listing of variables that can
 | 
	
		
			
				|  |  |  # otherwise modify the build.  The result only tells that the compiler
 | 
	
		
			
				|  |  |  # does not give an error message when it encounters the flag.  If the
 | 
	
	
		
			
				|  | @@ -40,8 +40,8 @@ include(CheckFortranSourceCompiles)
 | 
	
		
			
				|  |  |  include(CMakeCheckCompilerFlagCommonPatterns)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  macro (CHECK_Fortran_COMPILER_FLAG _FLAG _RESULT)
 | 
	
		
			
				|  |  | -  set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
 | 
	
		
			
				|  |  | -  set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
 | 
	
		
			
				|  |  | +  set(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
 | 
	
		
			
				|  |  | +  set(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |    # Normalize locale during test compilation.
 | 
	
		
			
				|  |  |    set(_CheckFortranCompilerFlag_LOCALE_VARS LC_ALL LC_MESSAGES LANG)
 | 
	
	
		
			
				|  | @@ -62,5 +62,5 @@ macro (CHECK_Fortran_COMPILER_FLAG _FLAG _RESULT)
 | 
	
		
			
				|  |  |    unset(_CheckFortranCompilerFlag_LOCALE_VARS)
 | 
	
		
			
				|  |  |    unset(_CheckFortranCompilerFlag_COMMON_PATTERNS)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -  set (CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
 | 
	
		
			
				|  |  | +  set (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
 | 
	
		
			
				|  |  |  endmacro ()
 |