Skip to content
Snippets Groups Projects
Commit 21e8d6f8 authored by Anthony Royer's avatar Anthony Royer
Browse files

Merge branch 'system-contrib' into 'master'

new ENABLE_SYSTEM_CONTRIB cmake option to enable use of system versions of...

See merge request !8
parents 75629d1b 064f5488
Branches
Tags
1 merge request!8new ENABLE_SYSTEM_CONTRIB cmake option to enable use of system versions of...
Pipeline #8930 passed
......@@ -131,6 +131,7 @@ if(HAVE_O3)
endif()
opt(MPI "Enable MPI" OFF)
opt(SYSTEM_CONTRIB "Use system versions of contrib libraries, when possible" OFF)
#----------------------------------
#
......@@ -143,7 +144,6 @@ add_subdirectory(src/domain)
add_subdirectory(src/field)
add_subdirectory(src/problem)
include_directories(src/common src/domain src/field src/problem)
include_directories(contrib/eigen)
add_subdirectory(examples)
add_subdirectory(tutorials)
......@@ -154,6 +154,17 @@ add_subdirectory(tutorials)
#
#----------------------------------
if(ENABLE_SYSTEM_CONTRIB)
find_path(EIGEN_INC "Eigen/Dense" HINTS eigen3)
if(EIGEN_INC)
include_directories(${EIGEN_INC})
else()
message(FATAL_ERROR "Could not find system Eigen - set ENABLE_SYSTEM_CONTRIB to false to use bundled version")
endif()
else()
include_directories(contrib/eigen)
endif()
# Gmsh (Mandatory)
find_library(GMSH_LIB gmsh)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment