diff --git a/CMakeLists.txt b/CMakeLists.txt index b5f3dd0369..d459371b61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -571,6 +571,7 @@ use_fast_build(TARGET MainDispatchDynamic) use_additional_optimization(TARGET MainDispatchDynamic) use_only_needed(TARGET MainDispatchDynamic) use_threads(TARGET MainDispatchDynamic) +use_runpath(TARGET MainDispatchDynamic) set_property(TARGET MainDispatchDynamic PROPERTY POSITION_INDEPENDENT_CODE ON) # We only wait for the hipification process if we are compiling HIP. @@ -615,6 +616,7 @@ foreach(OBJ ${COMMON_MODELS} ${FLOW_MODELS} ${FLOW_VARIANT_MODELS}) use_additional_optimization(TARGET flow_lib${OBJ}) use_only_needed(TARGET flow_lib${OBJ}) use_threads(TARGET flow_lib${OBJ}) + use_runpath(TARGET flow_lib${OBJ}) list(APPEND FLOW_TGTS $) if(TARGET fmt::fmt) target_link_libraries(flow_lib${OBJ} PRIVATE fmt::fmt) diff --git a/python/simulators/CMakeLists.txt b/python/simulators/CMakeLists.txt index b6607c5e2a..fe93c0c6ac 100644 --- a/python/simulators/CMakeLists.txt +++ b/python/simulators/CMakeLists.txt @@ -55,6 +55,7 @@ use_fast_build(TARGET BlackOil) use_additional_optimization(TARGET BlackOil) use_only_needed(TARGET BlackOil) use_threads(TARGET BlackOil) +use_runpath(TARGET BlackOil) pybind11_add_module(GasWater ${PYBIND11_SYSTEM} $ @@ -66,6 +67,7 @@ use_fast_build(TARGET GasWater) use_additional_optimization(TARGET GasWater) use_only_needed(TARGET GasWater) use_threads(TARGET GasWater) +use_runpath(TARGET GasWater) pybind11_add_module(OnePhase ${PYBIND11_SYSTEM} $ @@ -77,6 +79,7 @@ use_fast_build(TARGET OnePhase) use_additional_optimization(TARGET OnePhase) use_only_needed(TARGET OnePhase) use_threads(TARGET OnePhase) +use_runpath(TARGET OnePhase) # Create a convenience target to build all Python simulator modules add_custom_target(python_simulator_modules