Salome HOME
[TetraIntersect] Formatting and including what's inline really inline!
[tools/medcoupling.git] / src / MEDPartitioner_Swig / CMakeLists.txt
index a5ef082df115f229dd4d25b65b0095a463a4898b..696df4459f9a7b868ce39e63bc33990bcec7231e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2019  CEA/DEN, EDF R&D
+# Copyright (C) 2012-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
@@ -77,12 +77,14 @@ INSTALL(FILES MEDPartitioner.i MEDPartitionerCommon.i DESTINATION ${MEDCOUPLING_
 INSTALL(FILES MEDPartitionerTest.py DESTINATION ${MEDCOUPLING_INSTALL_SCRIPT_PYTHON})
 
 IF(MEDCOUPLING_PARTITIONER_METIS)
-   # Python test of partitionner require METIS or PARMETIS?
-   SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_CURRENT_BINARY_DIR}/../MEDLoader/Swig)
-   SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
-   ADD_TEST(MEDPartitionerTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDPartitionerTest.py)
-   SET_TESTS_PROPERTIES(MEDPartitionerTest PROPERTIES ENVIRONMENT "${tests_env}")
-   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader/Swig/MEDLoaderDataForTest.py ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+    IF(MEDCOUPLING_BUILD_PY_TESTS)
+       # Python test of partitionner require METIS or PARMETIS?
+       SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_CURRENT_BINARY_DIR}/../MEDLoader/Swig)
+       SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
+       ADD_TEST(MEDPartitionerTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDPartitionerTest.py)
+       SET_TESTS_PROPERTIES(MEDPartitionerTest PROPERTIES ENVIRONMENT "${tests_env}")
+       CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader/Swig/MEDLoaderDataForTest.py ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+    ENDIF()
 ENDIF()
 
 # Application tests