mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
added: option to install benchmarks
defaults to off. used for packaging
This commit is contained in:
parent
e337895692
commit
127ea79494
@ -18,6 +18,7 @@ cmake_minimum_required (VERSION 2.8)
|
||||
|
||||
set( OPM_COMMON_ROOT "" CACHE PATH "Root directory containing OPM related cmake modules")
|
||||
option(SIBLING_SEARCH "Search for other modules in sibling directories?" ON)
|
||||
option(INSTALL_BENCHMARKS "Install benchmark applications?" OFF)
|
||||
|
||||
if(NOT OPM_COMMON_ROOT)
|
||||
find_package(opm-common QUIET)
|
||||
@ -176,4 +177,7 @@ foreach(benchmark ${OPM_BENCHMARKS})
|
||||
add_custom_command(TARGET benchmarks-static POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/static/benchmarks/src/benchmarks-static-build/bin/${benchmark}
|
||||
${CMAKE_BINARY_DIR}/bin/${benchmark}-static)
|
||||
if(INSTALL_BENCHMARKS)
|
||||
install(TARGETS ${benchmark} DESTINATION bin)
|
||||
endif()
|
||||
endforeach()
|
||||
|
@ -50,4 +50,9 @@ endmacro (opm_pack_stone)
|
||||
opm_pack_stone (upscale_relperm_benchmark)
|
||||
opm_pack_case (upscale_relperm_benchmark benchmark20)
|
||||
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user