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

[cmake] format ProcessLib/

parent 07f31700
No related branches found
No related tags found
No related merge requests found
Showing
with 109 additions and 145 deletions
GET_SOURCE_FILES(SOURCES)
APPEND_SOURCE_FILES(SOURCES IO)
get_source_files(SOURCES)
append_source_files(SOURCES IO)
APPEND_SOURCE_FILES(SOURCES IO/XmlIO)
append_source_files(SOURCES IO/XmlIO)
if(OGS_BUILD_GUI)
APPEND_SOURCE_FILES(SOURCES IO/XmlIO/Qt)
append_source_files(SOURCES IO/XmlIO/Qt)
endif()
list(APPEND SOURCES "${CMAKE_CURRENT_BINARY_DIR}/BuildInfo.cpp" BuildInfo.h)
......
add_library(ProcessLibBoundaryConditionPython
PythonBoundaryCondition.cpp
PythonBoundaryCondition.h
PythonBoundaryConditionLocalAssembler.h
PythonBoundaryConditionPythonSideInterface.h)
PythonBoundaryCondition.cpp PythonBoundaryCondition.h
PythonBoundaryConditionLocalAssembler.h
PythonBoundaryConditionPythonSideInterface.h)
if(BUILD_SHARED_LIBS)
install(TARGETS ProcessLibBoundaryConditionPython
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_compile_definitions(ProcessLibBoundaryConditionPython
PUBLIC OGS_USE_PYTHON)
target_compile_definitions(ProcessLibBoundaryConditionPython PUBLIC
OGS_USE_PYTHON)
target_link_libraries(ProcessLibBoundaryConditionPython
PUBLIC BaseLib MathLib MeshLib NumLib logog ${Python_LIBRARIES}
PRIVATE pybind11::pybind11)
PUBLIC BaseLib
MathLib
MeshLib
NumLib
logog
${Python_LIBRARIES}
PRIVATE pybind11::pybind11)
# For the embedded Python module
add_library(ProcessLibBoundaryConditionPythonModule
PythonBoundaryConditionModule.cpp
PythonBoundaryConditionModule.h)
PythonBoundaryConditionModule.cpp PythonBoundaryConditionModule.h)
if(BUILD_SHARED_LIBS)
install(TARGETS ProcessLibBoundaryConditionPythonModule
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(ProcessLibBoundaryConditionPythonModule
PUBLIC
ProcessLibBoundaryConditionPython
pybind11::pybind11)
PUBLIC ProcessLibBoundaryConditionPython
pybind11::pybind11)
......@@ -10,13 +10,12 @@ foreach(process ${ProcessesList})
endif()
endforeach()
APPEND_SOURCE_FILES(SOURCES)
APPEND_SOURCE_FILES(SOURCES BoundaryCondition)
APPEND_SOURCE_FILES(SOURCES SurfaceFlux)
APPEND_SOURCE_FILES(SOURCES Output)
APPEND_SOURCE_FILES(SOURCES SourceTerms)
APPEND_SOURCE_FILES(SOURCES Utils)
append_source_files(SOURCES)
append_source_files(SOURCES BoundaryCondition)
append_source_files(SOURCES SurfaceFlux)
append_source_files(SOURCES Output)
append_source_files(SOURCES SourceTerms)
append_source_files(SOURCES Utils)
add_library(ProcessLib ${SOURCES})
if(BUILD_SHARED_LIBS)
......@@ -24,27 +23,22 @@ if(BUILD_SHARED_LIBS)
endif()
target_link_libraries(ProcessLib
PUBLIC
BaseLib
MaterialLib
MathLib
MeshGeoToolsLib
MeshLib
NumLib
logog
ChemistryLib
PRIVATE
ParameterLib
)
PUBLIC BaseLib
MaterialLib
MathLib
MeshGeoToolsLib
MeshLib
NumLib
logog
ChemistryLib
PRIVATE ParameterLib)
if(OGS_USE_PYTHON)
add_subdirectory(BoundaryCondition/Python)
target_link_libraries(ProcessLib
PUBLIC ProcessLibBoundaryConditionPython)
target_link_libraries(ProcessLib PUBLIC ProcessLibBoundaryConditionPython)
add_subdirectory(SourceTerms/Python)
target_link_libraries(ProcessLib
PUBLIC ProcessLibSourceTermPython)
target_link_libraries(ProcessLib PUBLIC ProcessLibSourceTermPython)
endif()
if(OGS_INSITU)
......
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(ComponentTransport ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS ComponentTransport LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS ComponentTransport
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(ComponentTransport
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(ComponentTransport PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(GroundwaterFlow ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS GroundwaterFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(GroundwaterFlow
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(GroundwaterFlow PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(HT ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS HT LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(HT
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(HT PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(HeatConduction ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS HeatConduction LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(HeatConduction
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(HeatConduction PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
APPEND_SOURCE_FILES(SOURCES BHE)
APPEND_SOURCE_FILES(SOURCES BoundaryConditions)
APPEND_SOURCE_FILES(SOURCES LocalAssemblers)
append_source_files(SOURCES)
append_source_files(SOURCES BHE)
append_source_files(SOURCES BoundaryConditions)
append_source_files(SOURCES LocalAssemblers)
add_library(HeatTransportBHE ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS HeatTransportBHE LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS HeatTransportBHE
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(HeatTransportBHE
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(HeatTransportBHE PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(HydroMechanics ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS HydroMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(HydroMechanics
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(HydroMechanics PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
add_subdirectory(Common)
APPEND_SOURCE_FILES(SOURCES HydroMechanics)
APPEND_SOURCE_FILES(SOURCES HydroMechanics/LocalAssembler)
APPEND_SOURCE_FILES(SOURCES SmallDeformation)
APPEND_SOURCE_FILES(SOURCES SmallDeformation/LocalAssembler)
append_source_files(SOURCES HydroMechanics)
append_source_files(SOURCES HydroMechanics/LocalAssembler)
append_source_files(SOURCES SmallDeformation)
append_source_files(SOURCES SmallDeformation/LocalAssembler)
add_library(LIE ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS LIE LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(LIE
PUBLIC ProcessLib LIECommon
PRIVATE ParameterLib
)
target_link_libraries(LIE PUBLIC ProcessLib LIECommon PRIVATE ParameterLib)
include(HydroMechanics/Tests.cmake)
include(SmallDeformation/Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(LIECommon ${SOURCES})
if(BUILD_SHARED_LIBS)
......
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(LiquidFlow ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS LiquidFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(LiquidFlow
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(LiquidFlow PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(PhaseField ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS PhaseField LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(PhaseField
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(PhaseField PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(RichardsComponentTransport ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS RichardsComponentTransport LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS RichardsComponentTransport
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(RichardsComponentTransport
PUBLIC ProcessLib
PRIVATE ParameterLib
)
PUBLIC ProcessLib
PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(RichardsFlow ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS RichardsFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(RichardsFlow
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(RichardsFlow PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(RichardsMechanics ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS RichardsMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS RichardsMechanics
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(RichardsMechanics
PUBLIC ProcessLib
PRIVATE RichardsFlow ParameterLib
)
PUBLIC ProcessLib
PRIVATE RichardsFlow ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(SmallDeformation ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS SmallDeformation LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS SmallDeformation
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(SmallDeformation
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(SmallDeformation PUBLIC ProcessLib PRIVATE ParameterLib)
include(Tests.cmake)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(SmallDeformationNonlocal ${SOURCES})
target_link_libraries(SmallDeformationNonlocal
PUBLIC ProcessLib
PRIVATE ParameterLib
)
PUBLIC ProcessLib
PRIVATE ParameterLib)
if(BUILD_SHARED_LIBS)
install(TARGETS SmallDeformationNonlocal LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS SmallDeformationNonlocal
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
include(Tests.cmake)
add_library(ProcessLibSourceTermPython
CreatePythonSourceTerm.cpp
CreatePythonSourceTerm.h
PythonSourceTerm.cpp
PythonSourceTerm.h
PythonSourceTermLocalAssembler.h
PythonSourceTermPythonSideInterface.h)
CreatePythonSourceTerm.cpp
CreatePythonSourceTerm.h
PythonSourceTerm.cpp
PythonSourceTerm.h
PythonSourceTermLocalAssembler.h
PythonSourceTermPythonSideInterface.h)
if(BUILD_SHARED_LIBS)
install(TARGETS ProcessLibSourceTermPython
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_compile_definitions(ProcessLibSourceTermPython
PUBLIC OGS_USE_PYTHON)
target_compile_definitions(ProcessLibSourceTermPython PUBLIC OGS_USE_PYTHON)
target_link_libraries(ProcessLibSourceTermPython
PUBLIC BaseLib MathLib MeshLib NumLib logog ${Python_LIBRARIES}
PRIVATE pybind11::pybind11)
PUBLIC BaseLib
MathLib
MeshLib
NumLib
logog
${Python_LIBRARIES}
PRIVATE pybind11::pybind11)
# For the embedded Python module
add_library(ProcessLibSourceTermPythonModule
PythonSourceTermModule.cpp
PythonSourceTermModule.h)
add_library(ProcessLibSourceTermPythonModule PythonSourceTermModule.cpp
PythonSourceTermModule.h)
if(BUILD_SHARED_LIBS)
install(TARGETS ProcessLibSourceTermPythonModule
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(ProcessLibSourceTermPythonModule
PUBLIC
ProcessLibSourceTermPython
pybind11::pybind11)
PUBLIC ProcessLibSourceTermPython pybind11::pybind11)
APPEND_SOURCE_FILES(SOURCES)
append_source_files(SOURCES)
add_library(TES ${SOURCES})
if(BUILD_SHARED_LIBS)
install(TARGETS TES LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
target_link_libraries(TES
PUBLIC ProcessLib
PRIVATE ParameterLib
)
target_link_libraries(TES PUBLIC ProcessLib PRIVATE ParameterLib)
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