From 810710a4c6a8a1d7f740287e55a9c237149b4bfc Mon Sep 17 00:00:00 2001 From: abn Date: Mon, 4 Jan 2016 12:21:39 +0100 Subject: [PATCH] Reduced version of INTERPKernel tests can be run in MICROMED mode. --- CMakeLists.txt | 6 +-- resources/CMakeLists.txt | 44 +++++++++------------- src/CMakeLists.txt | 7 +--- src/INTERP_KERNELTest/CMakeLists.txt | 9 ++++- src/INTERP_KERNELTest/TestInterpKernel.cxx | 5 +++ 5 files changed, 32 insertions(+), 39 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8786daa3a..788afbb4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -200,11 +200,7 @@ IF(MEDCOUPLING_BUILD_DOC) ADD_SUBDIRECTORY(doc) ENDIF(MEDCOUPLING_BUILD_DOC) -IF(NOT MEDCOUPLING_MICROMED) - IF(MEDCOUPLING_WITH_FILE_EXAMPLES) - ADD_SUBDIRECTORY(resources) - ENDIF(MEDCOUPLING_WITH_FILE_EXAMPLES) -ENDIF(NOT MEDCOUPLING_MICROMED) +ADD_SUBDIRECTORY(resources) # Configuration export # ==================== diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 3fe42f071..85ba41e6b 100644 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -17,7 +17,14 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(MED_RESOURCES_FILES +SET(MED_test_fig_files + Pol1.fig + Pol2.fig + Pol3.fig + Pol4.fig +) + +SET(MED_other_FILES #boitenew.cnc #boitenew.inp #boitenew.xyz @@ -192,10 +199,6 @@ SET(MED_RESOURCES_FILES Mesh3D_10_2d1.med Mesh3D_10_2d2.med Mesh3D_11.med - Pol1.fig - Pol2.fig - Pol3.fig - Pol4.fig # blow5_ascii.case # blow5_ascii.geo # blow5_ascii_cd_displacement @@ -209,31 +212,18 @@ SET(MED_RESOURCES_FILES agitateur.med ) -# IF(MED_ENABLE_GUI) -# FILE(GLOB MED_RESOURCES_PNG "${CMAKE_CURRENT_SOURCE_DIR}/*.png") -# SET(MED_RESOURCES_FILES -# ${MED_RESOURCES_FILES} -# ModuleMed.png -# Data.png -# Infos.png -# Structure.png -# explore_med_file.png -# field_selection.png -# med_mesh.png -# med_field.png -# mesh_selection.png -# ) -# ENDIF(MED_ENABLE_GUI) +SET(MED_RESOURCES_FILES ${MED_test_fig_files}) + +IF(NOT MEDCOUPLING_MICROMED) + IF(MEDCOUPLING_WITH_FILE_EXAMPLES) + FOREACH(resfile ${MED_other_FILES}) + LIST(APPEND MED_RESOURCES_FILES ${resfile}) + ENDFOREACH() + ENDIF() +ENDIF() FOREACH(resfile ${MED_RESOURCES_FILES}) CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/${resfile}" "${CMAKE_CURRENT_BINARY_DIR}/${resfile}" COPYONLY) ENDFOREACH(resfile) INSTALL(FILES ${MED_RESOURCES_FILES} DESTINATION ${MEDCOUPLING_INSTALL_RES_DATA}) - -#MESSAGE(STATUS "Creation of ${CMAKE_CURRENT_BINARY_DIR}/MEDCatalog.xml") -#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/MEDCatalog.xml.in ${CMAKE_CURRENT_BINARY_DIR}/MEDCatalog.xml @ONLY) -#MESSAGE(STATUS "Creation of ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml") -#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml @ONLY) - -#INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCatalog.xml ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml DESTINATION ${SALOME_MED_INSTALL_RES_DATA}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 62ef3fb7c..3076314bd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,11 +17,7 @@ # InterpKERNEL ADD_SUBDIRECTORY(INTERP_KERNEL) -IF(MEDCOUPLING_BUILD_TESTS) - IF(NOT MEDCOUPLING_MICROMED) # to be fixed later: the tests depends on some MEDLoader includes!! - ADD_SUBDIRECTORY(INTERP_KERNELTest) - ENDIF() -ENDIF(MEDCOUPLING_BUILD_TESTS) +ADD_SUBDIRECTORY(INTERP_KERNELTest) # MEDCoupling ADD_SUBDIRECTORY(MEDCoupling) @@ -29,7 +25,6 @@ IF(MEDCOUPLING_ENABLE_PYTHON) ADD_SUBDIRECTORY(MEDCoupling_Swig) ENDIF(MEDCOUPLING_ENABLE_PYTHON) - IF(NOT MEDCOUPLING_MICROMED) # MEDLoader ADD_SUBDIRECTORY(MEDLoader) diff --git a/src/INTERP_KERNELTest/CMakeLists.txt b/src/INTERP_KERNELTest/CMakeLists.txt index fcc8f4147..6a8cfb2b0 100644 --- a/src/INTERP_KERNELTest/CMakeLists.txt +++ b/src/INTERP_KERNELTest/CMakeLists.txt @@ -20,12 +20,15 @@ ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS}) +IF(MEDCOUPLING_MICROMED) + ADD_DEFINITIONS(-DMEDCOUPLING_MICROMED) +ENDIF() + INCLUDE_DIRECTORIES( ${CPPUNIT_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} ${MEDFILE_INCLUDE_DIRS} ${XDR_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases @@ -33,6 +36,10 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Geometric2D ) + +IF(NOT MEDCOUPLING_MICROMED) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader) +ENDIF() SET(InterpKernelTest_SOURCES BBTreeTest.cxx diff --git a/src/INTERP_KERNELTest/TestInterpKernel.cxx b/src/INTERP_KERNELTest/TestInterpKernel.cxx index bfc450a26..49d4663c9 100644 --- a/src/INTERP_KERNELTest/TestInterpKernel.cxx +++ b/src/INTERP_KERNELTest/TestInterpKernel.cxx @@ -27,12 +27,14 @@ #include "UnitTetraIntersectionBaryTest.hxx" #include "UnitTetra3D2DIntersectionTest.hxx" +#ifndef MEDCOUPLING_MICROMED #include "HexaTests.hxx" #include "InterpolationOptionsTest.hxx" #include "MultiElement2DTests.hxx" #include "MultiElementTetraTests.hxx" #include "SingleElementTetraTests.hxx" #include "ThreeDSurfProjectionTest.hxx" +#endif using namespace INTERP_TEST; @@ -47,12 +49,15 @@ CPPUNIT_TEST_SUITE_REGISTRATION( TransformedTriangleTest ); CPPUNIT_TEST_SUITE_REGISTRATION( UnitTetraIntersectionBaryTest ); CPPUNIT_TEST_SUITE_REGISTRATION( UnitTetra3D2DIntersectionTest ); +#ifndef MEDCOUPLING_MICROMED +// These test suites need MEDLoader to load some test files: CPPUNIT_TEST_SUITE_REGISTRATION( InterpolationOptionsTest ); CPPUNIT_TEST_SUITE_REGISTRATION( HexaTests ); CPPUNIT_TEST_SUITE_REGISTRATION( MultiElement2DTests ); CPPUNIT_TEST_SUITE_REGISTRATION( MultiElementTetraTests ); CPPUNIT_TEST_SUITE_REGISTRATION( SingleElementTetraTests ); CPPUNIT_TEST_SUITE_REGISTRATION( ThreeDSurfProjectionTest ); +#endif // --- generic Main program from KERNEL_SRC/src/Basics/Test #include "BasicMainTest.hxx" -- 2.39.2