Commit 05f01e74 authored by GILLES Sebastien's avatar GILLES Sebastien

#1217 Introduce a variable in CMake that loads properly symbols in case s static library is used.

parent 2781f087
......@@ -18,10 +18,19 @@ include(CustomCommands)
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})
# All --all_load in target_link_libraries of executables if STATIC library are chose.
if(LIBRARY_TYPE MATCHES STATIC)
set(ALL_LOAD_FLAG "-all_load")
else()
set(ALL_LOAD_FLAG "")
endif()
#MESSAGE("ALL_LOAD_FLAG: ${ALL_LOAD_FLAG}")
MESSAGE("Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} --my-debug-flags")
......
......@@ -34,10 +34,8 @@ 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 ${LIBRARY_TYPE} "")
target_link_libraries(morefem_formulation_solver morefem_param_instances)
target_link_libraries(morefem_formulation_solver morefem_op_instances)
include(FormulationSolver/SourceList.cmake)
add_library(morefem_model ${LIBRARY_TYPE} "")
......
......@@ -12,18 +12,13 @@ target_sources(morefem_rivlin_cube_lib
"${CMAKE_CURRENT_LIST_DIR}/VariationalFormulation.hxx"
)
target_link_libraries(morefem_rivlin_cube_lib
morefem_model
${ALL_LOAD_FLAG})
add_executable(morefem_rivlin_cube ${CMAKE_CURRENT_LIST_DIR}/main.cpp)
target_link_libraries(morefem_rivlin_cube
morefem_utilities
morefem_core
morefem_geometry
morefem_felt
morefem_param
morefem_op
morefem_op_instances
morefem_param_instances
morefem_formulation_solver
morefem_model
morefem_rivlin_cube_lib
)
\ No newline at end of file
morefem_rivlin_cube_lib)
\ No newline at end of file
......@@ -28,7 +28,7 @@ set(OPEN_MPI_LIB_DIR /Users/Shared/LibraryVersions/clang/Openmpi/lib )
# BLAS Library.
set(BLAS_CUSTOM_LINKER True)
set(BLAS_LIB_DIR None)
set(BLAS_LIB '-framework Accelerate )
set(BLAS_LIB -framework Accelerate )
# Petsc library.
set(PETSC_GENERAL_INCL_DIR /Users/Shared/LibraryVersions/clang/Petsc/include )
......
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