Commit 2781f087 authored by GILLES Sebastien's avatar GILLES Sebastien

#1217 Make the path to the settings file a mandatory argument to the cmake...

#1217 Make the path to the settings file a mandatory argument to the cmake command. Also use this file to decide whether static or shared libraries are built.
parent 2d5cb4af
......@@ -14,7 +14,13 @@ set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
MESSAGE("Module path: ${CMAKE_MODULE_PATH}")
include(CustomCommands)
include(Paths)
if(NOT PATH_FILE)
message(FATAL_ERROR "-DPATH_FILE must be present in the command line and point to a file that specify the paths and settings to use in the build. A default one is defined in cmake/Paths.cmake; feel free to copy and adapt it to your needs.")
endif()
include(${PATH_FILE})
MESSAGE("Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
......
add_library(morefem_utilities SHARED "")
add_library(morefem_utilities ${LIBRARY_TYPE} "")
target_link_libraries(morefem_utilities ${MOREFEM_COMMON_DEP})
include(Utilities/SourceList.cmake)
include(ThirdParty/SourceList.cmake)
......@@ -6,46 +6,45 @@ include(ThirdParty/Ops.cmake)
include(ThirdParty/Seldon.cmake)
include(ThirdParty/Source/CMakeLists.txt)
add_library(morefem_core SHARED "")
add_library(morefem_core ${LIBRARY_TYPE} "")
target_link_libraries(morefem_core morefem_utilities)
include(Core/SourceList.cmake)
add_library(morefem_geometry SHARED "")
add_library(morefem_geometry ${LIBRARY_TYPE} "")
target_link_libraries(morefem_geometry morefem_core)
include(Geometry/SourceList.cmake)
add_library(morefem_felt SHARED "")
add_library(morefem_felt ${LIBRARY_TYPE} "")
target_link_libraries(morefem_felt morefem_geometry)
include(FiniteElement/SourceList.cmake)
add_library(morefem_param SHARED "")
add_library(morefem_param ${LIBRARY_TYPE} "")
target_link_libraries(morefem_param morefem_felt)
include(Parameters/SourceList.cmake)
add_library(morefem_op SHARED "")
add_library(morefem_op ${LIBRARY_TYPE} "")
target_link_libraries(morefem_op morefem_param)
include(Operators/SourceList.cmake)
add_library(morefem_param_instances SHARED "")
add_library(morefem_param_instances ${LIBRARY_TYPE} "")
target_link_libraries(morefem_param_instances morefem_op)
include(ParameterInstances/SourceList.cmake)
add_library(morefem_op_instances SHARED "")
add_library(morefem_op_instances ${LIBRARY_TYPE} "")
target_link_libraries(morefem_op_instances morefem_param_instances)
include(OperatorInstances/SourceList.cmake)
add_library(morefem_formulation_solver SHARED "")
add_library(morefem_formulation_solver ${LIBRARY_TYPE} "")
target_link_libraries(morefem_formulation_solver morefem_param_instances)
include(FormulationSolver/SourceList.cmake)
add_library(morefem_model SHARED "")
add_library(morefem_model ${LIBRARY_TYPE} "")
target_link_libraries(morefem_model morefem_formulation_solver)
include(Model/SourceList.cmake)
# add_library(morefem_post_processing SHARED "")
# add_library(morefem_post_processing ${LIBRARY_TYPE} "")
# target_link_libraries(morefem_post_processing ${MOREFEM_COMMON_DEP})
# include(PostProcessing/SourceList.cmake)
......
......@@ -5,10 +5,10 @@ set(CC /Users/Shared/LibraryVersions/clang/Openmpi/bin/mpicc )
set(CXX /Users/Shared/LibraryVersions/clang/Openmpi/bin/mpic++ )
# Choose either 'debug' or 'release'.
set(MODE 'debug )
set(MODE debug)
# Choose either 'static' or 'shared'.
set(LIBRARY_TYPE 'static )
# Choose either STATIC or SHARED.
set(LIBRARY_TYPE STATIC)
# Whether specific macros should be activated or not.
......
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