|  | @@ -205,12 +205,21 @@ unset(CERES_COMPILE_OPTIONS)
 | 
	
		
			
				|  |  |  # Eigen.
 | 
	
		
			
				|  |  |  find_package(Eigen REQUIRED)
 | 
	
		
			
				|  |  |  if (EIGEN_FOUND)
 | 
	
		
			
				|  |  | +  message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}")
 | 
	
		
			
				|  |  |    if (EIGEN_VERSION VERSION_LESS 3.1.0)
 | 
	
		
			
				|  |  |      message(FATAL_ERROR "-- Ceres requires Eigen version >= 3.1.0 in order "
 | 
	
		
			
				|  |  |        "that Eigen/SparseCore be available, detected version of Eigen is: "
 | 
	
		
			
				|  |  |        "${EIGEN_VERSION}")
 | 
	
		
			
				|  |  |    endif (EIGEN_VERSION VERSION_LESS 3.1.0)
 | 
	
		
			
				|  |  | -  message("-- Found Eigen version ${EIGEN_VERSION}: ${EIGEN_INCLUDE_DIRS}")
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)" AND
 | 
	
		
			
				|  |  | +      EIGEN_VERSION VERSION_LESS 3.3.4)
 | 
	
		
			
				|  |  | +    # As per issue #289: https://github.com/ceres-solver/ceres-solver/issues/289
 | 
	
		
			
				|  |  | +    # the bundle_adjustment_test will fail for Eigen < 3.3.4 on aarch64.
 | 
	
		
			
				|  |  | +    message(FATAL_ERROR "-- Ceres requires Eigen version >= 3.3.4 on aarch64. "
 | 
	
		
			
				|  |  | +      "Detected version of Eigen is: ${EIGEN_VERSION}.")
 | 
	
		
			
				|  |  | +  endif()
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |    if (EIGENSPARSE)
 | 
	
		
			
				|  |  |      message("-- Enabling use of Eigen as a sparse linear algebra library.")
 | 
	
		
			
				|  |  |      list(APPEND CERES_COMPILE_OPTIONS CERES_USE_EIGEN_SPARSE)
 |