mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: reuse objects if building python inline
This commit is contained in:
parent
362c84a01c
commit
d286079393
@ -219,11 +219,16 @@ else()
|
||||
endif()
|
||||
|
||||
add_library(moduleVersion OBJECT opm/simulators/utils/moduleVersion.cpp)
|
||||
set_property(TARGET moduleVersion PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# Strictly we only depend on the update-version target,
|
||||
# but this is not exposed in a super-build.
|
||||
add_dependencies(moduleVersion opmsimulators)
|
||||
|
||||
add_library(flow_libblackoil OBJECT flow/flow_ebos_blackoil.cpp)
|
||||
set_property(TARGET flow_libblackoil PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
add_dependencies(flow_libblackoil opmsimulators)
|
||||
|
||||
# the production oriented general-purpose ECL simulator
|
||||
opm_add_test(flow
|
||||
ONLY_COMPILE
|
||||
@ -233,7 +238,6 @@ opm_add_test(flow
|
||||
LIBRARIES opmsimulators
|
||||
SOURCES
|
||||
flow/flow.cpp
|
||||
flow/flow_ebos_blackoil.cpp
|
||||
flow/flow_ebos_gasoil.cpp
|
||||
flow/flow_ebos_oilwater.cpp
|
||||
flow/flow_ebos_polymer.cpp
|
||||
@ -244,7 +248,9 @@ opm_add_test(flow
|
||||
flow/flow_ebos_energy.cpp
|
||||
flow/flow_ebos_oilwater_polymer.cpp
|
||||
flow/flow_ebos_oilwater_polymer_injectivity.cpp
|
||||
$<TARGET_OBJECTS:moduleVersion>)
|
||||
$<TARGET_OBJECTS:moduleVersion>
|
||||
$<TARGET_OBJECTS:flow_libblackoil>
|
||||
)
|
||||
|
||||
|
||||
if (NOT BUILD_FLOW_BLACKOIL_ONLY)
|
||||
|
@ -4,8 +4,8 @@ set_target_properties( simulators PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_
|
||||
|
||||
target_sources(simulators
|
||||
PRIVATE
|
||||
../../opm/simulators/utils/moduleVersion.cpp
|
||||
../../flow/flow_ebos_blackoil.cpp)
|
||||
$<TARGET_OBJECTS:moduleVersion>
|
||||
$<TARGET_OBJECTS:flow_libblackoil>)
|
||||
|
||||
target_link_libraries( simulators PRIVATE opmsimulators )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user