Skip to content
Snippets Groups Projects
Commit 17696834 authored by Lars Bilke's avatar Lars Bilke
Browse files

Download Eigen into the build dir if it is not found on the system.

parent e53f2e44
No related branches found
No related tags found
No related merge requests found
...@@ -98,6 +98,9 @@ ENDIF() #OGS_PACKAGING ...@@ -98,6 +98,9 @@ ENDIF() #OGS_PACKAGING
OPTION(Boost_USE_STATIC_LIBS "This option has to be set from the command line (before boost gets found)!" OFF) OPTION(Boost_USE_STATIC_LIBS "This option has to be set from the command line (before boost gets found)!" OFF)
INCLUDE(scripts/cmake/ExternalProjectBoost.cmake) INCLUDE(scripts/cmake/ExternalProjectBoost.cmake)
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ) INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} )
IF(OGS_USE_EIGEN)
INCLUDE(scripts/cmake/ExternalProjectEigen.cmake)
ENDIF()
# Add subdirectories with the projects # Add subdirectories with the projects
ADD_SUBDIRECTORY( ThirdParty ) ADD_SUBDIRECTORY( ThirdParty )
......
MESSAGE(STATUS "Eigen inc: ${EIGEN3_INCLUDE_DIR}")
IF(EIGEN3_FOUND)
RETURN()
ENDIF()
# First check for system Eigen
IF(NOT EIGEN3_INCLUDE_DIR)
FIND_PACKAGE(Eigen3)
IF(EIGEN3_FOUND)
SET(EIGEN3_FOUND TRUE CACHE BOOL "Was Eigen found?" FORCE)
SET(EIGEN3_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}" CACHE STRING "Eigen include dir" FORCE)
RETURN()
ELSE()
SET(EIGEN3_INCLUDE_DIR "")
ENDIF()
ENDIF()
ExternalProject_Add(Eigen
PREFIX ${CMAKE_BINARY_DIR}/External/eigen
URL http://bitbucket.org/eigen/eigen/get/3.2.0.tar.gz
URL_MD5 9559c34af203dde5f3f1d976d859c5b3
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
)
ExternalProject_Get_Property( Eigen source_dir )
IF(NOT EIGEN3_INCLUDE_DIR)
SET(EIGEN3_FOUND TRUE CACHE BOOL "Was Eigen found?" FORCE)
SET( EIGEN3_INCLUDE_DIR ${source_dir} CACHE INTERNAL "Eigen include dir")
MESSAGE(STATUS "Downloading Eigen automatically.")
ENDIF()
...@@ -165,8 +165,3 @@ ENDIF() # Shapelib_FOUND ...@@ -165,8 +165,3 @@ ENDIF() # Shapelib_FOUND
IF(OGS_USE_LIS) IF(OGS_USE_LIS)
FIND_PACKAGE( LIS REQUIRED ) FIND_PACKAGE( LIS REQUIRED )
ENDIF() ENDIF()
## Eigen ##
IF(OGS_USE_EIGEN)
FIND_PACKAGE( Eigen3 REQUIRED )
ENDIF()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment