ADD_SUBDIRECTORY(PyWrapping)
find_package(SalomeBasicIterativeStatistics)
- add_subdirectory(Stat)
+ if( BASICITERATIVESTATISTICS_FOUND )
+ add_subdirectory(Stat)
+ endif( BASICITERATIVESTATISTICS_FOUND )
ENDIF(MEDCOUPLING_ENABLE_PYTHON)
IF(NOT MEDCOUPLING_MICROMED)
SUBDIRS(MEDPartitioner_Swig)
SUBDIRS(RENUMBER_Swig)
SUBDIRS(PyWrapping)
+SUBDIRS(Stat)
IF(WIN32 OR CYGWIN)
SWIG_LINK_LIBRARIES(${MEDCouling_target_name} ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} medcouplingcpp)
-ELSE(WIN32)
+ELSE(WIN32 OR CYGWIN)
# ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
SWIG_LINK_LIBRARIES(${MEDCouling_target_name} ${PLATFORM_LIBS} medcouplingcpp)
-ENDIF(WIN32)
+ENDIF(WIN32 OR CYGWIN)
# ${PYTHON_LIBRARIES} not needed
SWIG_CHECK_GENERATION(${MEDCouling_target_name})
SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES CPLUSPLUS ON)
IF(WIN32 OR CYGWIN)
SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES} medcouplingremapper)
-ELSE(WIN32)
+ELSE(WIN32 OR CYGWIN)
# ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
SWIG_LINK_LIBRARIES(MEDCouplingRemapper medcouplingremapper)
-ENDIF(WIN32)
+ENDIF(WIN32 OR CYGWIN)
IF(WIN32)
SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d)
ELSE(WIN32)
# ${PYTHON_LIBRARIES} not needed see https://www.python.org/dev/peps/pep-0513/#libpythonx-y-so-1
SET(medcoupling_LIB_dependancies ${PLATFORM_LIBS} medcouplingremapper medicoco)
-ENDIF(WIN32)
+ENDIF(WIN32 OR CYGWIN)
IF(NOT MEDCOUPLING_MICROMED)
LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_MED_FILE)
+# Copyright (C) 2024 CEA, EDF
+#
+# This library 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 2.1 of the License, or (at your option) any later version.
+#
+# This library 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 this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
-if (BASICITERATIVESTATISTICS_FOUND)
- install(FILES MEDCouplingIterativeStatistics.py DESTINATION ${MEDCOUPLING_INSTALL_PYTHON})
+install(FILES MEDCouplingIterativeStatistics.py DESTINATION ${MEDCOUPLING_INSTALL_PYTHON})
- if (MEDCOUPLING_BUILD_PY_TESTS)
- add_subdirectory(Test)
- endif ()
+if (MEDCOUPLING_BUILD_PY_TESTS)
+ add_subdirectory(Test)
endif ()
+
+# Copyright (C) 2024 CEA, EDF
+#
+# This library 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 2.1 of the License, or (at your option) any later version.
+#
+# This library 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 this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_CURRENT_BINARY_DIR}/../../Stat)
SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
-ADD_TEST(NAME MEDCouplingIterativeStatistics
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/TestMEDCouplingIterativeStatistics.py)
+set(TEST_INSTALL_DIRECTORY ${MEDCOUPLING_INSTALL_TESTS}/Stat)
+
+ADD_TEST(NAME MEDCouplingIterativeStatistics COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/TestMEDCouplingIterativeStatistics.py)
SET_TESTS_PROPERTIES(MEDCouplingIterativeStatistics PROPERTIES ENVIRONMENT "${tests_env}")
+
+install(FILES TestMEDCouplingIterativeStatistics.py DESTINATION ${TEST_INSTALL_DIRECTORY})
+install(FILES CTestTestfileInstall.cmake DESTINATION ${TEST_INSTALL_DIRECTORY} RENAME CTestTestfile.cmake)
--- /dev/null
+# Copyright (C) 2024 CEA, EDF
+#
+# This library 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 2.1 of the License, or (at your option) any later version.
+#
+# This library 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 this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+SET(TEST_NAMES
+ TestMEDCouplingIterativeStatistics
+)
+
+SET(PYTHONPATH $ENV{PYTHONPATH})
+CMAKE_PATH(APPEND PYTHONPATH "../../bin")
+FOREACH(tfile ${TEST_NAMES})
+ SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
+ ADD_TEST(${TEST_NAME} python3 ${tfile}.py)
+ SET(TEST_ENVIRONMENT)
+ SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
+ LABELS "${COMPONENT_NAME}"
+ TIMEOUT ${TIMEOUT}
+ ENVIRONMENT "${PYTHONPATH}"
+ )
+ENDFOREACH()
if __name__ == "__main__":
+ import logging
+ from iterative_stats.utils.logger import logger
+ logger.level = logging.INFO
unittest.main()