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:
@@ -219,11 +219,16 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(moduleVersion OBJECT opm/simulators/utils/moduleVersion.cpp)
|
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,
|
# Strictly we only depend on the update-version target,
|
||||||
# but this is not exposed in a super-build.
|
# but this is not exposed in a super-build.
|
||||||
add_dependencies(moduleVersion opmsimulators)
|
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
|
# the production oriented general-purpose ECL simulator
|
||||||
opm_add_test(flow
|
opm_add_test(flow
|
||||||
ONLY_COMPILE
|
ONLY_COMPILE
|
||||||
@@ -233,7 +238,6 @@ opm_add_test(flow
|
|||||||
LIBRARIES opmsimulators
|
LIBRARIES opmsimulators
|
||||||
SOURCES
|
SOURCES
|
||||||
flow/flow.cpp
|
flow/flow.cpp
|
||||||
flow/flow_ebos_blackoil.cpp
|
|
||||||
flow/flow_ebos_gasoil.cpp
|
flow/flow_ebos_gasoil.cpp
|
||||||
flow/flow_ebos_oilwater.cpp
|
flow/flow_ebos_oilwater.cpp
|
||||||
flow/flow_ebos_polymer.cpp
|
flow/flow_ebos_polymer.cpp
|
||||||
@@ -244,7 +248,9 @@ opm_add_test(flow
|
|||||||
flow/flow_ebos_energy.cpp
|
flow/flow_ebos_energy.cpp
|
||||||
flow/flow_ebos_oilwater_polymer.cpp
|
flow/flow_ebos_oilwater_polymer.cpp
|
||||||
flow/flow_ebos_oilwater_polymer_injectivity.cpp
|
flow/flow_ebos_oilwater_polymer_injectivity.cpp
|
||||||
$<TARGET_OBJECTS:moduleVersion>)
|
$<TARGET_OBJECTS:moduleVersion>
|
||||||
|
$<TARGET_OBJECTS:flow_libblackoil>
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if (NOT BUILD_FLOW_BLACKOIL_ONLY)
|
if (NOT BUILD_FLOW_BLACKOIL_ONLY)
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ set_target_properties( simulators PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_
|
|||||||
|
|
||||||
target_sources(simulators
|
target_sources(simulators
|
||||||
PRIVATE
|
PRIVATE
|
||||||
../../opm/simulators/utils/moduleVersion.cpp
|
$<TARGET_OBJECTS:moduleVersion>
|
||||||
../../flow/flow_ebos_blackoil.cpp)
|
$<TARGET_OBJECTS:flow_libblackoil>)
|
||||||
|
|
||||||
target_link_libraries( simulators PRIVATE opmsimulators )
|
target_link_libraries( simulators PRIVATE opmsimulators )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user