changed: make boost::iostreams optional

only build benchmarks if it is found
This commit is contained in:
Arne Morten Kvarving 2020-02-19 12:57:57 +01:00
parent f0cf4f9823
commit bd30d159f6
2 changed files with 11 additions and 8 deletions

View File

@ -47,12 +47,14 @@ macro (opm_pack_stone test_exe)
endmacro (opm_pack_stone)
# pack these cases which are alternatives in the code
opm_pack_stone (upscale_relperm_benchmark)
opm_pack_case (upscale_relperm_benchmark benchmark20)
if(Boost_IOSTREAMS_FOUND)
opm_pack_stone (upscale_relperm_benchmark)
opm_pack_case (upscale_relperm_benchmark benchmark20)
if(INSTALL_BENCHMARKS)
add_custom_target(benchmarks ALL DEPENDS upscale_relperm_benchmark)
set_target_properties(upscale_relperm_benchmark PROPERTIES EXCLUDE_FROM_ALL 0)
else()
add_custom_target(benchmarks DEPENDS upscale_relperm_benchmark)
if(INSTALL_BENCHMARKS)
add_custom_target(benchmarks ALL DEPENDS upscale_relperm_benchmark)
set_target_properties(upscale_relperm_benchmark PROPERTIES EXCLUDE_FROM_ALL 0)
else()
add_custom_target(benchmarks DEPENDS upscale_relperm_benchmark)
endif()
endif()

View File

@ -10,7 +10,8 @@ set (opm-upscaling_DEPS
"C99"
# various runtime library enhancements
"Boost 1.44.0
COMPONENTS date_time system iostreams unit_test_framework REQUIRED"
COMPONENTS date_time system unit_test_framework REQUIRED"
"Boost 1.44.0 COMPONENTS iostreams"
# matrix library
"BLAS REQUIRED"
"LAPACK REQUIRED"