Exclude examples/sim_simple.cpp if UMFPACK is unavailable

Not all systems provide UMFPACK so even if Eigen provides the required
bindings, we should not assume that the underlying library and/or
headers are available.  Currently, only examples/sim_simple.cpp uses
UMFPACK unconditionally, so the simplest solution is to exclude that
example unless UMFPACK is available.
This commit is contained in:
Bård Skaflestad 2013-07-09 13:32:35 +02:00
parent df2964729a
commit 221a7261a8

View File

@ -30,6 +30,8 @@ set (${project}_DEPS
opm-core REQUIRED" opm-core REQUIRED"
# Eigen # Eigen
"Eigen3 3.1 REQUIRED" "Eigen3 3.1 REQUIRED"
# Tim Davis' SuiteSparse package
"SuiteSparse COMPONENTS umfpack"
) )
# Additional search modules # Additional search modules
@ -130,6 +132,12 @@ opm_out_dirs ()
# tests files in tests/, examples in examples/ # tests files in tests/, examples in examples/
opm_sources (${project}) opm_sources (${project})
if (NOT SuiteSparse_FOUND)
list(REMOVE_ITEM examples_SOURCES
${PROJECT_SOURCE_DIR}/examples/sim_simple.cpp
)
endif (NOT SuiteSparse_FOUND)
# Create configuration header which describes available features # Create configuration header which describes available features
# necessary to compile this library. Singular version is the names that # necessary to compile this library. Singular version is the names that
# is required by this project alone, plural version transitively # is required by this project alone, plural version transitively