Commit 2d5cb4af authored by GILLES Sebastien's avatar GILLES Sebastien

#1217 Modify the code to make it work with shared libraries. Rivlin cube runs...

#1217 Modify the code to make it work with shared libraries. Rivlin cube runs properly with this setting; I will enable choice between dynamic and static libraries soon (and use PRELINK option to make the static case work with my factories).
parent 9009bbf9
......@@ -44,6 +44,19 @@ morefem_find_library(LIB_PARMETIS "parmetis" ${PARMETIS_LIB_DIR} "Parmetis")
morefem_find_library(LIB_LUA "lua" ${LUA_LIB_DIR} "Lua")
morefem_find_library(LIB_BOOST_FILESYSTEM "boost_filesystem" ${BOOST_LIB_DIR} "Boost filesystem")
morefem_find_library(LIB_BOOST_SYSTEM "boost_system" ${BOOST_LIB_DIR} "Boost system")
set(MOREFEM_COMMON_DEP
${LIB_OPEN_MPI}
${LIB_OPEN_MPI_CXX}
${LIB_PETSC}
${LIB_PARMETIS}
${LIB_LUA}
${LIB_BOOST_FILESYSTEM}
${LIB_BOOST_SYSTEM}
"-framework Accelerate"
)
add_subdirectory(Sources)
......
......@@ -5695,7 +5695,7 @@
BED7BA851A13AEFC008E967C /* GodOfDof.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = GodOfDof.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
BED7BA861A13AEFC008E967C /* GodOfDof.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GodOfDof.hpp; sourceTree = "<group>"; };
BED7BA871A13AEFC008E967C /* GodOfDof.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = GodOfDof.hxx; sourceTree = "<group>"; };
BED97774201F7936004C346D /* Model2.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Model2.cpp; sourceTree = "<group>"; };
BED97774201F7936004C346D /* Model.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Model.cpp; sourceTree = "<group>"; };
BEDAC3C41AD7FBB500AA2156 /* NdofHolder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NdofHolder.cpp; sourceTree = "<group>"; };
BEDAC3C51AD7FBB500AA2156 /* NdofHolder.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = NdofHolder.hpp; sourceTree = "<group>"; };
BEDAC3C61AD7FBB500AA2156 /* NdofHolder.hxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = NdofHolder.hxx; sourceTree = "<group>"; };
......@@ -9267,7 +9267,7 @@
isa = PBXGroup;
children = (
BE576E941CB56C7C00872AA1 /* Model.doxygen */,
BED97774201F7936004C346D /* Model2.cpp */,
BED97774201F7936004C346D /* Model.cpp */,
BEBC911018216B180014BE93 /* Model.hpp */,
BEBC911118216B180014BE93 /* Model.hxx */,
BE40540C1AC1A78D0024D5F9 /* Internal */,
add_library(morefem_utilities STATIC "")
add_library(morefem_utilities SHARED "")
target_link_libraries(morefem_utilities ${MOREFEM_COMMON_DEP})
include(Utilities/SourceList.cmake)
include(ThirdParty/SourceList.cmake)
include(ThirdParty/Ops.cmake)
include(ThirdParty/Seldon.cmake)
include(ThirdParty/Source/CMakeLists.txt)
add_library(morefem_core STATIC "")
add_library(morefem_core SHARED "")
target_link_libraries(morefem_core morefem_utilities)
include(Core/SourceList.cmake)
add_library(morefem_geometry STATIC "")
add_library(morefem_geometry SHARED "")
target_link_libraries(morefem_geometry morefem_core)
include(Geometry/SourceList.cmake)
add_library(morefem_felt STATIC "")
add_library(morefem_felt SHARED "")
target_link_libraries(morefem_felt morefem_geometry)
include(FiniteElement/SourceList.cmake)
add_library(morefem_param STATIC "")
add_library(morefem_param SHARED "")
target_link_libraries(morefem_param morefem_felt)
include(Parameters/SourceList.cmake)
add_library(morefem_op STATIC "")
add_library(morefem_op SHARED "")
target_link_libraries(morefem_op morefem_param)
include(Operators/SourceList.cmake)
add_library(morefem_op_instances STATIC "")
add_library(morefem_param_instances SHARED "")
target_link_libraries(morefem_param_instances morefem_op)
include(ParameterInstances/SourceList.cmake)
add_library(morefem_op_instances SHARED "")
target_link_libraries(morefem_op_instances morefem_param_instances)
include(OperatorInstances/SourceList.cmake)
add_library(morefem_param_instances STATIC "")
include(ParameterInstances/SourceList.cmake)
add_library(morefem_formulation_solver STATIC "")
add_library(morefem_formulation_solver SHARED "")
target_link_libraries(morefem_formulation_solver morefem_param_instances)
include(FormulationSolver/SourceList.cmake)
add_library(morefem_model STATIC "")
add_library(morefem_model SHARED "")
target_link_libraries(morefem_model morefem_formulation_solver)
include(Model/SourceList.cmake)
add_library(morefem_post_processing STATIC "")
include(PostProcessing/SourceList.cmake)
# add_library(morefem_post_processing SHARED "")
# target_link_libraries(morefem_post_processing ${MOREFEM_COMMON_DEP})
# include(PostProcessing/SourceList.cmake)
include(ModelInstances/CMakeLists.txt)
\ No newline at end of file
......@@ -2,7 +2,7 @@
//
// Empty file created to help CMake!
//
// Model2.cpp
// Model.cpp
// MoReFEM
//
// Created by sebastien on 29/01/2018.
......
......@@ -14,13 +14,6 @@ target_sources(morefem_rivlin_cube_lib
add_executable(morefem_rivlin_cube ${CMAKE_CURRENT_LIST_DIR}/main.cpp)
target_link_libraries(morefem_rivlin_cube
${LIB_OPEN_MPI}
${LIB_OPEN_MPI_CXX}
${LIB_PETSC}
${LIB_PARMETIS}
${LIB_LUA}
${LIB_BOOST_FILESYSTEM}
${LIB_BOOST_SYSTEM}
morefem_utilities
morefem_core
morefem_geometry
......@@ -32,5 +25,5 @@ target_link_libraries(morefem_rivlin_cube
morefem_formulation_solver
morefem_model
morefem_rivlin_cube_lib
"-framework Accelerate"
)
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment