diff --git a/cmake/Modules b/cmake/Modules index 711d603..efcb171 160000 --- a/cmake/Modules +++ b/cmake/Modules @@ -1 +1 @@ -Subproject commit 711d603069fa2e95392871298448a9604ce8381a +Subproject commit efcb171e71b83668e7d380a8563ec2f9ecc1eca3 diff --git a/packages/akantu.cmake b/packages/akantu.cmake index 8f9b0f1..1d96443 100644 --- a/packages/akantu.cmake +++ b/packages/akantu.cmake @@ -1,93 +1,91 @@ #=============================================================================== # @file akantu.cmake # # @author Guillaume Anciaux <guillaume.anciaux@epfl.ch> # @author Till Junge <till.junge@epfl.ch> # @author Nicolas Richart <nicolas.richart@epfl.ch> # # @date Tue Jul 22 14:47:56 2014 # # @brief Akantu package # # @section LICENSE # # Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne) # Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) # # LibMultiScale is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # LibMultiScale is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License # along with LibMultiScale. If not, see <http://www.gnu.org/licenses/>. # #=============================================================================== package_declare(AKANTU EXTERNAL DESCRIPTION "Akantu support" SYSTEM OFF DEFAULT OFF ) package_get_name(AKANTU _pkg_name) package_use_system(AKANTU _use_system) if(NOT ${_use_system}) package_get_option_name(AKANTU _option_name) if(${_option_name}) set(AKANTU_TARGETS_EXPORT LibMultiScaleLibraryDepends) set(AKANTU_DISABLE_CPACK ON) set(AKANTU_USE_IOHELPER OFF CACHE BOOL "iohelper option in Akantu" FORCE) set(AKANTU_PARALLEL ON CACHE BOOL "Add parallel support in Akantu" FORCE) set(AKANTU_USE_LAPACK ON CACHE BOOL "Add lapack support in Akantu" FORCE) set(AKANTU_CORE_CXX11 OFF CACHE BOOL "core package for Akantu" FORCE) # set the needed option to ON. Anciaux, do NOT comment this again set(AKANTU_IMPLICIT ON CACHE BOOL "Add the implicit support for Akantu" FORCE) add_subdirectory(third-party/akantu) get_cmake_property(_cache_variables CACHE_VARIABLES) # Set all akantu options as off and mark them as advanced mark_as_advanced(Akantu_DIR) foreach(_var ${_cache_variables}) if(_var MATCHES "^AKANTU_") mark_as_advanced(${_var}) get_property(_variable_type CACHE ${_var} PROPERTY TYPE) if("${_variable_type}" STREQUAL "BOOL") get_property(_variable_desc CACHE ${_var} PROPERTY HELPSTRING) # set(${_var} OFF CACHE BOOL ${_variable_desc} FORCE) endif() endif() endforeach() package_set_libraries(AKANTU akantu) package_set_include_dir(AKANTU ${AKANTU_INCLUDE_DIRS}) - #list(APPEND LIBMULTISCALE_EXPORT_LIST akantu) - #list(APPEND LIBMULTISCALE_EXPORT_LIST iohelper) - #list(APPEND LIBMULTISCALE_OPTION_LIST AKANTU) + package_add_to_export_list(AKANTU akantu) if(AKANTU_EXCLUDE_SOURCE_FILES) set(_tmp "third-party/akantu/src/${AKANTU_EXCLUDE_SOURCE_FILES}") string(REPLACE ";" ";third-party/akantu/src/" _tmp "${_tmp}") list(APPEND _tmp ${LIBMULTISCALE_EXCLUDE_SOURCE_FILES}) set(LIBMULTISCALE_EXCLUDE_SOURCE_FILES ${_tmp} CACHE INTERNAL "") endif() list(APPEND LIBMULTISCALE_TESTS_EXCLUDE_FILES ${AKANTU_TESTS_EXCLUDE_FILES}) list(APPEND LIBMULTISCALE_DOC_EXCLUDE_FILES ${AKANTU_DOC_EXCLUDE_FILES}) endif() else() add_optional_external_package(Akantu "Plugin Akantu for continuum" TRUE FOUND Akantu) endif() diff --git a/packages/lammps.cmake b/packages/lammps.cmake index 4df2a43..aaa0213 100644 --- a/packages/lammps.cmake +++ b/packages/lammps.cmake @@ -1,69 +1,66 @@ #=============================================================================== # @file lammps.cmake # # @author Guillaume Anciaux <guillaume.anciaux@epfl.ch> # @author Nicolas Richart <nicolas.richart@epfl.ch> # # @date Mon Oct 28 19:23:14 2013 # # @brief LAMMPS package # # @section LICENSE # # Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne) # Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) # # LibMultiScale is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # LibMultiScale is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License # along with LibMultiScale. If not, see <http://www.gnu.org/licenses/>. # #=============================================================================== package_declare(LAMMPS EXTERNAL DESCRIPTION "LAMMPS support" SYSTEM OFF DEFAULT OFF ) package_get_name(LAMMPS _pkg_name) _package_use_system(${_pkg_name} _use_system) if(NOT ${_use_system}) _package_get_option_name(${_pkg_name} _option_name) if(${_option_name}) set(LAMMPS_TARGETS_EXPORT LibMultiScaleLibraryDepends) # if (LIBMULTISCALE_USE_ZLIB) # option(LAMMPS_ZLIB "Activate the ZLIB compression feature" ON) # endif() add_subdirectory(third-party/lammps) set_target_properties(lmp_${LAMMPS_ARCH} PROPERTIES COMPILE_FLAGS "-w") foreach(_var ${_cache_variables}) if(_var MATCHES "^LAMMPS_") mark_as_advanced(${_var}) endif() endforeach() _package_set_libraries(${_pkg_name} lmp_${LAMMPS_ARCH}) _package_set_include_dir(${_pkg_name} ${LAMMPS_INCLUDE_DIRS}) - - # list(APPEND LIBMULTISCALE_EXPORT_LIST lmp_${LAMMPS_ARCH} meam) - # list(APPEND LIBMULTISCALE_OPTION_LIST LAMMPS) - -# set(LIBMULTISCALE_LAMMPS OFF) + + package_add_to_export_list(LAMMPS lmp_${LAMMPS_ARCH} meam) endif() else() add_optional_external_package(LAMMPS "Plugin LAMMPS for MD" FALSE FOUND LAMMPS) endif() diff --git a/packages/paradis.cmake b/packages/paradis.cmake index db3a19a..1495ba4 100644 --- a/packages/paradis.cmake +++ b/packages/paradis.cmake @@ -1,71 +1,70 @@ #=============================================================================== # @file paradis.cmake # # @author Guillaume Anciaux <guillaume.anciaux@epfl.ch> # @author Till Junge <till.junge@epfl.ch> # @author Nicolas Richart <nicolas.richart@epfl.ch> # @author Moseley Philip Arthur <philip.moseley@epfl.ch> # # @date Fri Jul 11 15:47:44 2014 # # @brief ParaDiS package # # @section LICENSE # # Copyright (©) 2010-2011 EPFL (Ecole Polytechnique Fédérale de Lausanne) # Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) # # LibMultiScale is free software: you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # LibMultiScale is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License # along with LibMultiScale. If not, see <http://www.gnu.org/licenses/>. # #=============================================================================== package_declare(PARADIS EXTERNAL DESCRIPTION "ParaDiS support" SYSTEM OFF DEFAULT OFF COMPILE_FLAGS "-DPARADIS_DISPLACEMENTS -DPARADIS_IN_LIBMULTISCALE" ) package_get_name(PARADIS _pkg_name) _package_use_system(${_pkg_name} _use_system) if(NOT ${_use_system}) _package_get_option_name(${_pkg_name} _option_name) if(${_option_name}) set(PARADIS_TARGETS_EXPORT LibMultiScaleLibraryDepends) set(PARADIS_IN_LIBMULTISCALE ON CACHE BOOL "Specify paradis that he is used inside of libmultiscale" FORCE) set(PARADIS_DISPLACEMENTS ON CACHE BOOL "Enable calculation of displacements in paradis" FORCE) add_subdirectory(third-party/paradis) set_target_properties(ParaDiS PROPERTIES COMPILE_FLAGS "-w") foreach(_var ${_cache_variables}) if(_var MATCHES "^PARADIS_") mark_as_advanced(${_var}) endif() endforeach() _package_set_libraries(${_pkg_name} ParaDiS) _package_set_include_dir(${_pkg_name} ${PARADIS_INCLUDE_DIRS}) - #list(APPEND LIBMULTISCALE_EXPORT_LIST ParaDiS) - #list(APPEND LIBMULTISCALE_OPTION_LIST PARADIS) + package_add_to_export_list(PARADIS ParaDiS) endif() else() add_optional_external_package(ParaDiS "Plugin for PARADIS as DD code" OFF) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7bc8947..ae8c742 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,143 +1,142 @@ #=============================================================================== # @file CMakeLists.txt # # @author Guillaume Anciaux <guillaume.anciaux@epfl.ch> # @author Nicolas Richart <nicolas.richart@epfl.ch> # # @date Wed Apr 03 23:50:25 2013 # # @brief This is the main CMake configuration file for LM library # # @section LICENSE # # Copyright INRIA and CEA # # The LibMultiScale is a C++ parallel framework for the multiscale # coupling methods dedicated to material simulations. This framework # provides an API which makes it possible to program coupled simulations # and integration of already existing codes. # # This Project was initiated in a collaboration between INRIA Futurs Bordeaux # within ScAlApplix team and CEA/DPTA Ile de France. # The project is now continued at the Ecole Polytechnique Fédérale de Lausanne # within the LSMS/ENAC laboratory. # # This software is governed by the CeCILL-C license under French law and # abiding by the rules of distribution of free software. You can use, # modify and/ or redistribute the software under the terms of the CeCILL-C # license as circulated by CEA, CNRS and INRIA at the following URL # "http://www.cecill.info". # # As a counterpart to the access to the source code and rights to copy, # modify and redistribute granted by the license, users are provided only # with a limited warranty and the software's author, the holder of the # economic rights, and the successive licensors have only limited # liability. # # In this respect, the user's attention is drawn to the risks associated # with loading, using, modifying and/or developing or reproducing the # software by the user in light of its specific status of free software, # that may mean that it is complicated to manipulate, and that also # therefore means that it is reserved for developers and experienced # professionals having in-depth computer knowledge. Users are therefore # encouraged to load and test the software's suitability as regards their # requirements in conditions enabling the security of their systems and/or # data to be ensured and, more generally, to use and operate it in the # same conditions as regards security. # # The fact that you are presently reading this means that you have had # knowledge of the CeCILL-C license and that you accept its terms. # #=============================================================================== package_get_all_source_files( LIBMULTISCALE_SRCS LIBMULTISCALE_PUBLIC_HDRS LIBMULTISCALE_PRIVATE_HDRS ) package_get_all_include_directories( LIBMULTISCALE_INCLUDE_DIRS ) package_get_all_external_informations( LIBMULTISCALE_EXTERNAL_INCLUDE_DIR LIBMULTISCALE_EXTERNAL_LIBRARIES ) list(APPEND LIBMULTISCALE_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/src) set(_lists_list atom_model compute_real_input compute_ref_input compute_ref_output continuum_model coupler dd_model dumper_real_input dumper_ref_input filter stimulation_ref_input stimulation_real_input geometry ) foreach(__list ${_lists_list}) generate_list(${__list} ${CMAKE_CURRENT_BINARY_DIR}/${__list}_list.hh) list(APPEND LIBMULTISCALE_LIST_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/${__list}_list.hh) endforeach() set(_hdrs_lists_list continuum dd dumper filter md stimulation geometry coupler ) foreach(_hdrs_list ${_hdrs_lists_list}) generate_module_header_file(${_hdrs_list} ${CMAKE_CURRENT_BINARY_DIR}/lib_${_hdrs_list}.hh) list(APPEND LIBMULTISCALE_LIST_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/lib_${_hdrs_list}.hh) endforeach() #set(LIBMULTISCALE_INCLUDE_DIRS ${LIBMULTISCALE_INCLUDE_DIRS} PARENT_SCOPE) #set(LIBMULTISCALE_SRCS ${LIBMULTISCALE_SRCS} PARENT_SCOPE) #set(LIBMULTISCALE_HDRS ${LIBMULTISCALE_HDRS} PARENT_SCOPE) #set(LIBMULTISCALE_INLINE_SRCS ${LIBMULTISCALE_INLINE_SRCS} PARENT_SCOPE) # include_directories(${LIBMULTISCALE_INCLUDE_DIRS} ${LIBMULTISCALE_EXTERNAL_INCLUDE_DIR}) package_get_all_definitions(LIBMULTISCALE_DEFINITIONS) foreach(_dep ${LIBMULTISCALE_DEFINITIONS}) add_definitions(-D${_dep}) endforeach() add_library(multiscale ${LIBMULTISCALE_SRCS} ${LIBMULTISCALE_INLINE_SRCS}) target_link_libraries(multiscale ${LIBMULTISCALE_EXTERNAL_LIBRARIES} rt) if(LIBMULTISCALE_LIBRARY_PROPERTIE) set_target_properties(multiscale PROPERTIES ${LIBMULTISCALE_LIBRARY_PROPERTIES}) endif() set(LIBMULTISCALE_PUBLIC_HEADERS ${LIBMULTISCALE_HDRS} ${LIBMULTISCALE_LIST_HEADERS}) set_target_properties(multiscale PROPERTIES PUBLIC_HEADER "${LIBMULTISCALE_PUBLIC_HEADERS}") -list(APPEND LIBMULTISCALE_EXPORT_LIST multiscale) - install(TARGETS multiscale EXPORT LibMultiScaleLibraryDepends LIBRARY DESTINATION lib COMPONENT lib ARCHIVE DESTINATION lib COMPONENT lib PUBLIC_HEADER DESTINATION include/libmultiscale/ COMPONENT dev ) install(EXPORT LibMultiScaleLibraryDepends DESTINATION lib/libmultiscale COMPONENT dev) #Export for build tree -export(TARGETS ${LIBMULTISCALE_EXPORT_LIST} +package_get_all_export_list(export_list) +export(TARGETS multiscale ${export_list} FILE "${CMAKE_BINARY_DIR}/LibMultiScaleLibraryDepends.cmake") export(PACKAGE LibMultiScale) diff --git a/third-party/akantu b/third-party/akantu index b1a0f8b..4d2e1c8 160000 --- a/third-party/akantu +++ b/third-party/akantu @@ -1 +1 @@ -Subproject commit b1a0f8bfaa8eb932ff47e556a5a1252ca7d36e1c +Subproject commit 4d2e1c88e26810bcb63b50b47496b6fffce29e02