Skip to content
Snippets Groups Projects
Verified Commit cbaba76e authored by Lars Bilke's avatar Lars Bilke
Browse files

[cmake-format] ProcessLib/* CMakeLists.txt

parent 918ba477
No related branches found
No related tags found
No related merge requests found
Showing
with 96 additions and 79 deletions
...@@ -16,6 +16,9 @@ parse: ...@@ -16,6 +16,9 @@ parse:
- set_property - set_property
- - cmdline - - cmdline
additional_commands: additional_commands:
ogs_add_library:
pargs:
nargs: 2+
addtest: addtest:
pargs: pargs:
nargs: '*' nargs: '*'
......
ogs_add_library(ProcessLibBoundaryConditionPython ogs_add_library(
PythonBoundaryCondition.cpp ProcessLibBoundaryConditionPython
PythonBoundaryCondition.h PythonBoundaryCondition.cpp
PythonBoundaryConditionLocalAssembler.h PythonBoundaryCondition.h
PythonBoundaryConditionPythonSideInterface.h PythonBoundaryConditionLocalAssembler.h
BHEInflowPythonBoundaryCondition.h PythonBoundaryConditionPythonSideInterface.h
BHEInflowPythonBoundaryConditionPythonSideInterface.h) BHEInflowPythonBoundaryCondition.h
BHEInflowPythonBoundaryConditionPythonSideInterface.h
)
target_compile_definitions(ProcessLibBoundaryConditionPython target_compile_definitions(
PUBLIC ProcessLibBoundaryConditionPython
OGS_USE_PYTHON PUBLIC OGS_USE_PYTHON
# Enabled elements # Enabled elements
OGS_MAX_ELEMENT_DIM=${OGS_MAX_ELEMENT_DIM} OGS_MAX_ELEMENT_DIM=${OGS_MAX_ELEMENT_DIM}
OGS_MAX_ELEMENT_ORDER=${OGS_MAX_ELEMENT_ORDER} OGS_MAX_ELEMENT_ORDER=${OGS_MAX_ELEMENT_ORDER}
$<$<BOOL:${OGS_ENABLE_ELEMENT_SIMPLEX}>:OGS_ENABLE_ELEMENT_SIMPLEX> $<$<BOOL:${OGS_ENABLE_ELEMENT_SIMPLEX}>:OGS_ENABLE_ELEMENT_SIMPLEX>
$<$<BOOL:${OGS_ENABLE_ELEMENT_CUBOID}>:OGS_ENABLE_ELEMENT_CUBOID> $<$<BOOL:${OGS_ENABLE_ELEMENT_CUBOID}>:OGS_ENABLE_ELEMENT_CUBOID>
$<$<BOOL:${OGS_ENABLE_ELEMENT_PRISM}>:OGS_ENABLE_ELEMENT_PRISM> $<$<BOOL:${OGS_ENABLE_ELEMENT_PRISM}>:OGS_ENABLE_ELEMENT_PRISM>
$<$<BOOL:${OGS_ENABLE_ELEMENT_PYRAMID}>:OGS_ENABLE_ELEMENT_PYRAMID> $<$<BOOL:${OGS_ENABLE_ELEMENT_PYRAMID}>:OGS_ENABLE_ELEMENT_PYRAMID>
) )
target_link_libraries( target_link_libraries(
ProcessLibBoundaryConditionPython ProcessLibBoundaryConditionPython PUBLIC BaseLib MathLib MeshLib NumLib
PUBLIC BaseLib MathLib MeshLib NumLib ${Python3_LIBRARIES} ${Python3_LIBRARIES}
PRIVATE pybind11::pybind11 spdlog::spdlog) PRIVATE pybind11::pybind11 spdlog::spdlog
)
# For the embedded Python module # For the embedded Python module
ogs_add_library(ProcessLibBoundaryConditionPythonModule ogs_add_library(
PythonBoundaryConditionModule.cpp PythonBoundaryConditionModule.h ProcessLibBoundaryConditionPythonModule PythonBoundaryConditionModule.cpp
BHEInflowPythonBoundaryConditionModule.cpp PythonBoundaryConditionModule.h BHEInflowPythonBoundaryConditionModule.cpp
BHEInflowPythonBoundaryConditionModule.h) BHEInflowPythonBoundaryConditionModule.h
)
target_link_libraries(ProcessLibBoundaryConditionPythonModule target_link_libraries(
PUBLIC ProcessLibBoundaryConditionPython ProcessLibBoundaryConditionPythonModule
pybind11::pybind11) PUBLIC ProcessLibBoundaryConditionPython pybind11::pybind11
)
...@@ -5,12 +5,10 @@ append_source_files(SOURCES LocalAssemblers) ...@@ -5,12 +5,10 @@ append_source_files(SOURCES LocalAssemblers)
ogs_add_library(HeatTransportBHE ${SOURCES}) ogs_add_library(HeatTransportBHE ${SOURCES})
target_link_libraries(HeatTransportBHE target_link_libraries(
PUBLIC HeatTransportBHE PUBLIC ProcessLib
ProcessLib PRIVATE ParameterLib
PRIVATE $<$<TARGET_EXISTS:pybind11::pybind11>:pybind11::pybind11>
ParameterLib
$<$<TARGET_EXISTS:pybind11::pybind11>:pybind11::pybind11>
) )
if(OGS_BUILD_TESTING) if(OGS_BUILD_TESTING)
......
get_source_files(SOURCES) get_source_files(SOURCES)
ogs_add_library(RichardsComponentTransport ${SOURCES}) ogs_add_library(RichardsComponentTransport ${SOURCES})
target_link_libraries(RichardsComponentTransport target_link_libraries(
PUBLIC ProcessLib RichardsComponentTransport PUBLIC ProcessLib PRIVATE ParameterLib
PRIVATE ParameterLib) )
if(OGS_BUILD_TESTING) if(OGS_BUILD_TESTING)
include(Tests.cmake) include(Tests.cmake)
......
get_source_files(SOURCES) get_source_files(SOURCES)
ogs_add_library(SmallDeformationNonlocal ${SOURCES}) ogs_add_library(SmallDeformationNonlocal ${SOURCES})
target_link_libraries(SmallDeformationNonlocal target_link_libraries(
PUBLIC ProcessLib SmallDeformationNonlocal PUBLIC ProcessLib PRIVATE ParameterLib
PRIVATE ParameterLib) )
if(OGS_BUILD_TESTING) if(OGS_BUILD_TESTING)
include(Tests.cmake) include(Tests.cmake)
......
ogs_add_library(ProcessLibSourceTermPython ogs_add_library(
CreatePythonSourceTerm.cpp ProcessLibSourceTermPython
CreatePythonSourceTerm.h CreatePythonSourceTerm.cpp
PythonSourceTerm.cpp CreatePythonSourceTerm.h
PythonSourceTerm.h PythonSourceTerm.cpp
PythonSourceTermLocalAssembler.h PythonSourceTerm.h
PythonSourceTermPythonSideInterface.h) PythonSourceTermLocalAssembler.h
PythonSourceTermPythonSideInterface.h
)
target_compile_definitions(ProcessLibSourceTermPython target_compile_definitions(
PUBLIC ProcessLibSourceTermPython
OGS_USE_PYTHON PUBLIC OGS_USE_PYTHON
# Enabled elements # Enabled elements
OGS_MAX_ELEMENT_DIM=${OGS_MAX_ELEMENT_DIM} OGS_MAX_ELEMENT_DIM=${OGS_MAX_ELEMENT_DIM}
OGS_MAX_ELEMENT_ORDER=${OGS_MAX_ELEMENT_ORDER} OGS_MAX_ELEMENT_ORDER=${OGS_MAX_ELEMENT_ORDER}
$<$<BOOL:${OGS_ENABLE_ELEMENT_SIMPLEX}>:OGS_ENABLE_ELEMENT_SIMPLEX> $<$<BOOL:${OGS_ENABLE_ELEMENT_SIMPLEX}>:OGS_ENABLE_ELEMENT_SIMPLEX>
$<$<BOOL:${OGS_ENABLE_ELEMENT_CUBOID}>:OGS_ENABLE_ELEMENT_CUBOID> $<$<BOOL:${OGS_ENABLE_ELEMENT_CUBOID}>:OGS_ENABLE_ELEMENT_CUBOID>
$<$<BOOL:${OGS_ENABLE_ELEMENT_PRISM}>:OGS_ENABLE_ELEMENT_PRISM> $<$<BOOL:${OGS_ENABLE_ELEMENT_PRISM}>:OGS_ENABLE_ELEMENT_PRISM>
$<$<BOOL:${OGS_ENABLE_ELEMENT_PYRAMID}>:OGS_ENABLE_ELEMENT_PYRAMID> $<$<BOOL:${OGS_ENABLE_ELEMENT_PYRAMID}>:OGS_ENABLE_ELEMENT_PYRAMID>
) )
target_link_libraries( target_link_libraries(
ProcessLibSourceTermPython ProcessLibSourceTermPython PUBLIC BaseLib MathLib MeshLib NumLib
PUBLIC BaseLib MathLib MeshLib NumLib ${Python3_LIBRARIES} ${Python3_LIBRARIES}
PRIVATE pybind11::pybind11 spdlog::spdlog) PRIVATE pybind11::pybind11 spdlog::spdlog
)
# For the embedded Python module # For the embedded Python module
ogs_add_library(ProcessLibSourceTermPythonModule PythonSourceTermModule.cpp ogs_add_library(
PythonSourceTermModule.h) ProcessLibSourceTermPythonModule PythonSourceTermModule.cpp
PythonSourceTermModule.h
)
target_link_libraries(ProcessLibSourceTermPythonModule target_link_libraries(
PUBLIC ProcessLibSourceTermPython pybind11::pybind11) ProcessLibSourceTermPythonModule PUBLIC ProcessLibSourceTermPython
pybind11::pybind11
)
...@@ -2,7 +2,8 @@ get_source_files(SOURCES) ...@@ -2,7 +2,8 @@ get_source_files(SOURCES)
ogs_add_library(SteadyStateDiffusion ${SOURCES}) ogs_add_library(SteadyStateDiffusion ${SOURCES})
target_link_libraries(SteadyStateDiffusion PUBLIC ProcessLib target_link_libraries(
PRIVATE ParameterLib) SteadyStateDiffusion PUBLIC ProcessLib PRIVATE ParameterLib
)
include(Tests.cmake) include(Tests.cmake)
...@@ -3,11 +3,12 @@ get_source_files(SOURCES) ...@@ -3,11 +3,12 @@ get_source_files(SOURCES)
ogs_add_library(ThermalTwoPhaseFlowWithPP ${SOURCES}) ogs_add_library(ThermalTwoPhaseFlowWithPP ${SOURCES})
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
install(TARGETS ThermalTwoPhaseFlowWithPP install(TARGETS ThermalTwoPhaseFlowWithPP
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
endif() endif()
target_link_libraries(ThermalTwoPhaseFlowWithPP target_link_libraries(
PUBLIC ProcessLib ThermalTwoPhaseFlowWithPP PUBLIC ProcessLib PRIVATE ParameterLib
PRIVATE ParameterLib) )
if(OGS_BUILD_TESTING) if(OGS_BUILD_TESTING)
include(Tests.cmake) include(Tests.cmake)
......
get_source_files(SOURCES) get_source_files(SOURCES)
ogs_add_library(ThermoHydroMechanics ${SOURCES}) ogs_add_library(ThermoHydroMechanics ${SOURCES})
target_link_libraries(ThermoHydroMechanics target_link_libraries(
PUBLIC ProcessLib ThermoHydroMechanics PUBLIC ProcessLib PRIVATE ParameterLib
PRIVATE ParameterLib) )
if(OGS_BUILD_TESTING) if(OGS_BUILD_TESTING)
include(Tests.cmake) include(Tests.cmake)
......
get_source_files(SOURCES) get_source_files(SOURCES)
ogs_add_library(ThermoMechanicalPhaseField ${SOURCES}) ogs_add_library(ThermoMechanicalPhaseField ${SOURCES})
target_link_libraries(ThermoMechanicalPhaseField target_link_libraries(
PUBLIC ProcessLib ThermoMechanicalPhaseField PUBLIC ProcessLib PRIVATE ParameterLib
PRIVATE ParameterLib) )
if(OGS_BUILD_TESTING) if(OGS_BUILD_TESTING)
include(Tests.cmake) include(Tests.cmake)
......
get_source_files(SOURCES) get_source_files(SOURCES)
ogs_add_library(ThermoRichardsMechanics ${SOURCES}) ogs_add_library(ThermoRichardsMechanics ${SOURCES})
target_link_libraries(ThermoRichardsMechanics PUBLIC ProcessLib PRIVATE ParameterLib) target_link_libraries(
ThermoRichardsMechanics PUBLIC ProcessLib PRIVATE ParameterLib
)
if(OGS_BUILD_TESTING) if(OGS_BUILD_TESTING)
include(Tests.cmake) include(Tests.cmake)
......
get_source_files(SOURCES) get_source_files(SOURCES)
ogs_add_library(TwoPhaseFlowWithPrho ${SOURCES}) ogs_add_library(TwoPhaseFlowWithPrho ${SOURCES})
target_link_libraries(TwoPhaseFlowWithPrho target_link_libraries(
PUBLIC ProcessLib TwoPhaseFlowWithPrho PUBLIC ProcessLib PRIVATE ParameterLib
PRIVATE ParameterLib) )
if(OGS_BUILD_TESTING) if(OGS_BUILD_TESTING)
include(Tests.cmake) include(Tests.cmake)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment