Skip to content
Snippets Groups Projects
Verified Commit 2c6dad8d authored by Santiago Ospina De Los Ríos's avatar Santiago Ospina De Los Ríos
Browse files

Add components to CMake installation & offer static and shared libraries

parent 428a6a23
No related branches found
No related tags found
1 merge request!17Resolve "Add special membranes for species that only pass through to it but not diffuse"
Pipeline #24325 failed
......@@ -2,5 +2,6 @@ add_subdirectory(common)
add_subdirectory(concepts)
add_subdirectory(finite_element)
add_subdirectory(finite_element_map)
add_subdirectory(local_operator)
add_subdirectory(grid)
add_subdirectory(model)
......@@ -2,8 +2,8 @@ install(FILES coefficient_mapper.hh
data_context.hh
enum.hh
muparser_data_handler.hh
parameter_tree_check.hh
pdelab_expression_adapter.hh
factory.hh
tiff_grayscale.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/common")
install(FILES grid.hh pdelab.hh typetree.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/concepts")
......@@ -4,4 +4,5 @@ install(FILES dynamic_power.hh
local_basis_cache.hh
p0.hh
pk.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/finite_element")
install(FILES local_basis.hh
local_coefficients.hh
local_interpolation.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/finite_element/dynamic_power")
\ No newline at end of file
......@@ -5,4 +5,5 @@ install(
pk.hh
variadic.hh
virtual.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/finite_element_map")
......@@ -2,4 +2,5 @@ install(FILES multidomain_gmsh_reader.hh
multidomain_entity_transformation.hh
has_single_geometry_type.hh
mark_stripes.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/grid")
add_subdirectory(diffusion_reaction)
install(FILES variadic.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/local_operator")
\ No newline at end of file
install(FILES base.hh
continuous_galerkin.hh
finite_volume.hh
multidomain.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/local_operator/diffusion_reaction")
\ No newline at end of file
install(FILES base.hh
multidomain_local_operator.hh
local_operator_base.hh
local_operator_CG.hh
local_operator_FV.hh
local_operator_variadic.hh
diffusion_reaction.cc
diffusion_reaction.hh
multidomain_diffusion_reaction.cc
multidomain_diffusion_reaction.hh
state.hh
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/dune/copasi/model")
......@@ -5,12 +5,33 @@ target_include_directories(dune_copasi_lib INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
add_library(dune_copasi_md_lib STATIC dune_copasi_md.cc)
target_link_libraries(dune_copasi_md_lib PUBLIC dune_copasi_lib)
add_library(dune_copasi_md_lib-static STATIC dune_copasi_md.cc)
target_link_libraries(dune_copasi_md_lib-static PUBLIC dune_copasi_lib)
add_library(dune_copasi_sd_lib STATIC dune_copasi_sd.cc)
target_link_libraries(dune_copasi_sd_lib PUBLIC dune_copasi_lib)
add_library(dune_copasi_md_lib-shared EXCLUDE_FROM_ALL SHARED dune_copasi_md.cc)
target_link_libraries(dune_copasi_md_lib-shared PUBLIC dune_copasi_lib)
install(TARGETS dune_copasi_lib dune_copasi_md_lib
ARCHIVE
DESTINATION ${CMAKE_INSTALL_LIBDIR})
\ No newline at end of file
add_library(dune_copasi_sd_lib-static EXCLUDE_FROM_ALL STATIC dune_copasi_sd.cc)
target_link_libraries(dune_copasi_sd_lib-static PUBLIC dune_copasi_lib)
add_library(dune_copasi_sd_lib-shared EXCLUDE_FROM_ALL SHARED dune_copasi_sd.cc)
target_link_libraries(dune_copasi_sd_lib-shared PUBLIC dune_copasi_lib)
install(
TARGETS dune_copasi_lib
dune_copasi_md_lib-static
dune_copasi_sd_lib-static
ARCHIVE
OPTIONAL
COMPONENT Library
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
install(
TARGETS dune_copasi_md_lib-shared
dune_copasi_sd_lib-shared
LIBRARY
OPTIONAL
COMPONENT Library
DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
\ No newline at end of file
add_executable(dune_copasi_md dune_copasi_md.cc)
target_link_libraries(dune_copasi_md PRIVATE dune_copasi_md_lib)
target_link_libraries(dune_copasi_md PRIVATE dune_copasi_md_lib-static)
add_executable(dune_copasi_sd dune_copasi_sd.cc)
target_link_libraries(dune_copasi_sd PRIVATE dune_copasi_sd_lib)
add_executable(dune_copasi_sd EXCLUDE_FROM_ALL dune_copasi_sd.cc)
target_link_libraries(dune_copasi_sd PRIVATE dune_copasi_sd_lib-static)
add_custom_target(dune_copasi ALL DEPENDS dune_copasi_md)
install(TARGETS dune_copasi_md RUNTIME DESTINATION
"${CMAKE_INSTALL_BINDIR}/")
install(
TARGETS dune_copasi_md
RUNTIME
COMPONENT Executable
DESTINATION "${CMAKE_INSTALL_BINDIR}/")
install(TARGETS dune_copasi_sd RUNTIME DESTINATION
"${CMAKE_INSTALL_BINDIR}/")
\ No newline at end of file
install(
TARGETS dune_copasi_sd
RUNTIME
OPTIONAL
COMPONENT Executable
DESTINATION "${CMAKE_INSTALL_BINDIR}/")
\ No newline at end of file
......@@ -28,8 +28,8 @@ dune_add_test(NAME test_tiff_grayscale
add_custom_target(build_system_tests DEPENDS dune_copasi)
add_executable(dune_copasi_sd_compare EXCLUDE_FROM_ALL dune_copasi_sd_compare.cc)
add_executable(dune_copasi_md_compare EXCLUDE_FROM_ALL dune_copasi_md_compare.cc)
target_link_libraries(dune_copasi_sd_compare PRIVATE dune_copasi_sd_lib)
target_link_libraries(dune_copasi_md_compare PRIVATE dune_copasi_md_lib)
target_link_libraries(dune_copasi_sd_compare PRIVATE dune_copasi_sd_lib-static)
target_link_libraries(dune_copasi_md_compare PRIVATE dune_copasi_md_lib-static)
add_dependencies(build_system_tests dune_copasi_sd_compare dune_copasi_md_compare)
if (dune-testtools_FOUND)
......@@ -81,11 +81,6 @@ if (dune-testtools_FOUND)
SCRIPT dune_vtkcompare.py
INIFILE test_cell.mini)
add_system_test_per_target(
TARGET dune_copasi_md
SCRIPT dune_vtkcompare.py
INIFILE test_liver.mini)
dune_add_system_test(
SOURCE test_jacobian.cc
BASENAME dune_copasi_test_jacobian
......
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