]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
[EDF30834] : Couple correctly ActiveExtensions and tests are correctly linked now.
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 29 Aug 2024 15:13:06 +0000 (17:13 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 29 Aug 2024 15:13:06 +0000 (17:13 +0200)
src/CMakeLists.txt
src/CTestTestfileInstall.cmake.in
src/PyWrapping/CMakeLists.txt
src/ShapeRecogn/Test/CMakeLists.txt
src/ShapeRecogn/Test/CTestTestfileInstall.cmake

index 3911381c8a078f53ce68ad9ceb7e064a6b7e3c17..357cd0e1d1775aa31a9757983406a5e7caf8410c 100644 (file)
@@ -31,9 +31,9 @@ ENDIF(MEDCOUPLING_BUILD_TESTS)
 ADD_SUBDIRECTORY(MEDCoupling)
 ADD_SUBDIRECTORY(ICoCo)
 
+# Shape recognition
 IF(MEDCOUPLING_ENABLE_SHAPERECOGN)
   ADD_SUBDIRECTORY(ShapeRecogn)
-  LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_SHAPE_RECOGN)
 ENDIF(MEDCOUPLING_ENABLE_SHAPERECOGN)
 
 IF(MEDCOUPLING_ENABLE_PYTHON)
index 6ef143d8f9b7df434a3dd88ba2867b779d0faab1..62a36f4b5c5fd2087054fc17fa9d078ec3c2bf74 100644 (file)
@@ -21,6 +21,7 @@ SET(COMPONENT_NAME MEDCOUPLING)
 SET(TIMEOUT        120)
 SET(MEDCOUPLING_BUILD_PY_TESTS $<BOOL:@MEDCOUPLING_BUILD_PY_TESTS@>)
 SET(MEDCOUPLING_USE_MPI_BOOL $<BOOL:@MEDCOUPLING_USE_MPI@>)
+SET(MEDCOUPLING_ENABLE_SHAPERECOGN $<BOOL:@MEDCOUPLING_ENABLE_SHAPERECOGN@>)
 
 SUBDIRS(INTERP_KERNELTest)
 SUBDIRS(MEDCoupling)
@@ -35,6 +36,10 @@ if(MEDCOUPLING_USE_MPI_BOOL)
     SUBDIRS(ParaMEDMEM_Swig)
 endif()
 
+if(MEDCOUPLING_ENABLE_SHAPERECOGN)
+    SUBDIRS(ShapeRecogn)
+endif()
+
 SUBDIRS(MEDPartitioner_Swig)
 SUBDIRS(RENUMBER_Swig)
 SUBDIRS(PyWrapping)
index 136cdd2894f3f7d8564d18c1e245c70d39d38b8d..c37d6780d8b2b645b4500dfe53c3061b55853cfb 100644 (file)
@@ -37,6 +37,10 @@ IF(MEDCOUPLING_USE_64BIT_IDS)
   STRING(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS ";-DMEDCOUPLING_USE_64BIT_IDS")
 ENDIF(MEDCOUPLING_USE_64BIT_IDS)
 
+IF(MEDCOUPLING_ENABLE_SHAPERECOGN)
+  LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_SHAPE_RECOGN)
+ENDIF(MEDCOUPLING_ENABLE_SHAPERECOGN)
+
 SET(medcoupling_SWIG_DPYS_FILES medcoupling.i)
 
 INCLUDE_DIRECTORIES(
index 4206fa0c00e7bdd55993bc8905256dde466ae2e4..57247a660be812d8eda27f3ac76a9668187a5bff 100644 (file)
@@ -43,24 +43,28 @@ SET(TestShapeRecogn_SOURCES
 SALOME_ACCUMULATE_ENVIRONMENT(MEDCOUPLING_RESOURCE_DIR "${CMAKE_BINARY_DIR}/resources")
 SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env)
 
-ADD_EXECUTABLE(TestShapeRecogn ${TestShapeRecogn_SOURCES})
-TARGET_LINK_LIBRARIES(TestShapeRecogn shaperecogn InterpKernelTestUtils medloader ${MEDFILE_C_LIBRARIES} ${HDF5_LIBRARIES} ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
 
-INSTALL(TARGETS TestShapeRecogn DESTINATION ${MEDCOUPLING_INSTALL_BINS})
+IF(NOT MEDCOUPLING_MICROMED)
+  SET(TESTSHAPE_RECOGN0 TestShapeRecogn)
+  ADD_EXECUTABLE(${TESTSHAPE_RECOGN0} ${TestShapeRecogn_SOURCES})
+  TARGET_LINK_LIBRARIES(${TESTSHAPE_RECOGN0} shaperecogn InterpKernelTestUtils medloader ${MEDFILE_C_LIBRARIES} ${HDF5_LIBRARIES} ${CPPUNIT_LIBRARIES} ${PLATFORM_LIBS})
 
-SET(BASE_TESTS TestShapeRecogn)
+  INSTALL(TARGETS ${TESTSHAPE_RECOGN0} DESTINATION ${MEDCOUPLING_INSTALL_BINS})
 
-FOREACH(test ${BASE_TESTS})
-  ADD_TEST(NAME ${test}
-           COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MCTestLauncher.py ${CMAKE_CURRENT_BINARY_DIR}/${test})
-  SET_TESTS_PROPERTIES(${test} PROPERTIES ENVIRONMENT "${tests_env}")
-ENDFOREACH()
+  SET(BASE_TESTS ${TESTSHAPE_RECOGN0})
 
-# Application tests
+  FOREACH(test ${BASE_TESTS})
+    ADD_TEST(NAME ${test}
+            COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${test})
+    SET_TESTS_PROPERTIES(${test} PROPERTIES ENVIRONMENT "${tests_env}")
+  ENDFOREACH()
 
-SET(TEST_INSTALL_DIRECTORY ${MEDCOUPLING_INSTALL_TESTS}/ShapeRecogn)
-INSTALL(TARGETS TestShapeRecogn DESTINATION ${TEST_INSTALL_DIRECTORY})
+  # Application tests
 
-INSTALL(FILES CTestTestfileInstall.cmake
-        DESTINATION ${TEST_INSTALL_DIRECTORY}
-        RENAME CTestTestfile.cmake)
+  SET(TEST_INSTALL_DIRECTORY ${MEDCOUPLING_INSTALL_TESTS}/ShapeRecogn)
+  INSTALL(TARGETS ${TESTSHAPE_RECOGN0} DESTINATION ${TEST_INSTALL_DIRECTORY})
+
+  INSTALL(FILES CTestTestfileInstall.cmake
+          DESTINATION ${TEST_INSTALL_DIRECTORY}
+          RENAME CTestTestfile.cmake)
+ENDIF(NOT MEDCOUPLING_MICROMED)
index 3309262399365ddad98a00239e661265315b82c0..b636c20a0f509847652569538fa8479db7277c50 100644 (file)
@@ -23,7 +23,7 @@ SET(TEST_NAMES
 
 FOREACH(tfile ${TEST_NAMES})
   SET(TEST_NAME ${COMPONENT_NAME}_${tfile})
-  ADD_TEST(${TEST_NAME} python3 MCTestLauncher.py ${tfile})
+  ADD_TEST(${TEST_NAME} ${tfile})
   SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES
     LABELS "${COMPONENT_NAME}"
     TIMEOUT ${TIMEOUT}