diff --git a/test/python/CMakeLists.txt b/test/python/CMakeLists.txt index 01dbe67..7145493 100644 --- a/test/python/CMakeLists.txt +++ b/test/python/CMakeLists.txt @@ -1,41 +1,79 @@ +#Copyright EPFL and INRIA +# +#author : Guillaume ANCIAUX (guillaume.anciaux@epfl.fr, g.anciaux@laposte.net) +# +#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 is done in a collaboration between +#EPFL within ENAC-LSMS (http://lsms.epfl.ch/) and +#INRIA Bordeaux, ScAlApplix (http://www.labri.fr/projet/scalapplix/). +# +#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_include_directories( LIBMULTISCALE_INCLUDE_DIRS ) package_get_all_external_informations( - LIBMULTISCALE_EXTERNAL_INCLUDE_DIR - LIBMULTISCALE_EXTERNAL_LIBRARIES -) + PRIVATE_INCLUDE LIBMULTISCALE_EXTERNAL_INCLUDE_DIR + LIBRARIES LIBMULTISCALE_EXTERNAL_LIBRARIES + ) 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(test_python MODULE test_python.cc) -target_link_libraries(test_python PRIVATE pybind11::module) +target_link_libraries(test_python PRIVATE pybind11::module ${LIBMULTISCALE_EXTERNAL_LIBRARIES}) set_target_properties(test_python PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}" SUFFIX "${PYTHON_MODULE_EXTENSION}" ) function(register_pytest name filename) add_test( NAME ${name} COMMAND python3 -m pytest ${filename} -v WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) set_property(TEST ${name} PROPERTY ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_BINARY_DIR}/python" ) endfunction(register_pytest) register_pytest(PythonBindings test_bindings.py) register_pytest(Lammps test_lammps.py) register_pytest(CADD test_cadd.py) diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 8ead5a9..13c1c70 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -1,82 +1,82 @@ #Copyright EPFL and INRIA # #author : Guillaume ANCIAUX (guillaume.anciaux@epfl.fr, g.anciaux@laposte.net) # #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 is done in a collaboration between #EPFL within ENAC-LSMS (http://lsms.epfl.ch/) and #INRIA Bordeaux, ScAlApplix (http://www.labri.fr/projet/scalapplix/). # #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. include(GoogleTest) find_package(GTest) if (GTEST_FOUND) package_get_all_include_directories( LIBMULTISCALE_INCLUDE_DIRS ) package_get_all_external_informations( PRIVATE_INCLUDE LIBMULTISCALE_EXTERNAL_INCLUDE_DIR LIBRARIES LIBMULTISCALE_EXTERNAL_LIBRARIES ) package_get_all_definitions(LIBMULTISCALE_DEFINITIONS) foreach(_dep ${LIBMULTISCALE_DEFINITIONS}) add_definitions(-D${_dep}) endforeach() include_directories( ${LIBMULTISCALE_INCLUDE_DIRS} ${LIBMULTISCALE_EXTERNAL_INCLUDE_DIR}) set(LIBS ${GTEST_BOTH_LIBRARIES} pthread) add_executable(test_geometry test_geometry.cc) add_executable(test_vector test_vector.cc) add_executable(test_parser test_parser.cc) add_executable(test_component test_component.cc) add_executable(test_shape_matrix test_shape_matrix.cc) target_compile_options (test_component PRIVATE -std=c++17) target_link_libraries(test_vector ${LIBS}) target_link_libraries(test_geometry ${LIBS} multiscale) target_link_libraries(test_parser ${LIBS} multiscale) target_link_libraries(test_component ${LIBS} multiscale) - target_link_libraries(test_shape_matrix ${LIBS} ${LIBMULTISCALE_EXTERNAL_LIBRARIES} multiscale) + target_link_libraries(test_shape_matrix ${LIBS} multiscale) gtest_discover_tests(test_vector) gtest_discover_tests(test_geometry) gtest_discover_tests(test_parser) gtest_discover_tests(test_component) gtest_discover_tests(test_shape_matrix) endif()