diff --git a/CMakeLists.txt b/CMakeLists.txt index b2ee905bf..f7b74f01f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -499,23 +499,25 @@ opm_add_test(flow_distribute_z ${FLOW_TGTS} $ ) -if (NOT BUILD_FLOW_ALU_GRID) - set(FLOW_ALUGRID_ONLY_DEFAULT_ENABLE_IF "FALSE") -else() - set(FLOW_ALUGRID_ONLY_DEFAULT_ENABLE_IF "TRUE") -endif() -# the production oriented general-purpose ECL simulator -opm_add_test(flow_alugrid - ONLY_COMPILE - ALWAYS_ENABLE - DEFAULT_ENABLE_IF ${FLOW_ALUGRID_ONLY_DEFAULT_ENABLE_IF} - DEPENDS opmsimulators - LIBRARIES opmsimulators - SOURCES - flow/flow_blackoil_alugrid.cpp - $) -target_compile_definitions(flow_alugrid PRIVATE USE_ALUGRID) +if(dune-alugrid_FOUND) + if (NOT BUILD_FLOW_ALU_GRID) + set(FLOW_ALUGRID_ONLY_DEFAULT_ENABLE_IF "FALSE") + else() + set(FLOW_ALUGRID_ONLY_DEFAULT_ENABLE_IF "TRUE") + endif() + + opm_add_test(flow_alugrid + ONLY_COMPILE + ALWAYS_ENABLE + DEFAULT_ENABLE_IF ${FLOW_ALUGRID_ONLY_DEFAULT_ENABLE_IF} + DEPENDS opmsimulators + LIBRARIES opmsimulators + SOURCES + flow/flow_blackoil_alugrid.cpp + $) + target_compile_definitions(flow_alugrid PRIVATE USE_ALUGRID) +endif() if (BUILD_FLOW) install(TARGETS flow DESTINATION bin) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index cabbfebf1..eecb8e850 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -30,17 +30,6 @@ #if USE_ALUGRID #define DISABLE_ALUGRID_SFC_ORDERING 1 -#if !HAVE_DUNE_ALUGRID -#warning "ALUGrid was indicated to be used for the ECL black oil simulator, but this " -#warning "requires the presence of dune-alugrid >= 2.4. Falling back to Dune::CpGrid" -#undef USE_ALUGRID -#define USE_ALUGRID 0 -#endif -#else -#define USE_ALUGRID 0 -#endif - -#if USE_ALUGRID #include "eclalugridvanguard.hh" #elif USE_POLYHEDRALGRID #include "eclpolyhedralgridvanguard.hh"