#=============================================================================== # @file CMakeLists.txt # # @author Guillaume Anciaux # @author Nicolas Richart # # @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( PRIVATE_INCLUDE LIBMULTISCALE_EXTERNAL_INCLUDE_DIR INTERFACE_INCLUDE LIBMULTISCALE_INTERFACE_EXTERNAL_LIBRARIES LIBRARIES LIBMULTISCALE_EXTERNAL_LIBRARIES ) list(APPEND LIBMULTISCALE_INCLUDE_DIRS ${CMAKE_BINARY_DIR}/src) set(_lists_list atom_model compute continuum_model coupler dd_model dumper filter stimulation 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() set_source_files_properties(${RELEASE_FILE} PROPERTIES GENERATED 1) add_library(multiscale ${LIBMULTISCALE_SRCS} ${LIBMULTISCALE_INLINE_SRCS} ${RELEASE_FILE}) add_dependencies(multiscale RELEASE_INFO) 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}") 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 package_get_all_export_list(export_list) export(TARGETS multiscale ${export_list} FILE "${CMAKE_BINARY_DIR}/LibMultiScaleLibraryDepends.cmake") export(PACKAGE LibMultiScale)