From e181d13cf100caa8a05e1ab73be9b6941c057388 Mon Sep 17 00:00:00 2001 From: sln Date: Wed, 10 Oct 2012 09:44:21 +0000 Subject: [PATCH] Compilation without HDF --- adm_local/unix/config_files/Makefile.am | 1 + configure.ac | 20 ++++++++++++++++++++ src/LightApp/LightApp_HDFDriver.cxx | 2 +- src/LightApp/LightApp_HDFDriver.h | 2 +- src/LightApp/Makefile.am | 17 +++++++++++++---- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/adm_local/unix/config_files/Makefile.am b/adm_local/unix/config_files/Makefile.am index 61a491acd..2352d12ac 100644 --- a/adm_local/unix/config_files/Makefile.am +++ b/adm_local/unix/config_files/Makefile.am @@ -25,6 +25,7 @@ check_GraphicsView.m4 \ check_GUI.m4 \ check_msg2qm.m4 \ check_OCCViewer.m4 \ +check_HDF.m4 \ check_opengl.m4 \ check_Plot2dViewer.m4 \ check_PyConsole.m4 \ diff --git a/configure.ac b/configure.ac index fcdb2018a..a7e125d75 100644 --- a/configure.ac +++ b/configure.ac @@ -70,6 +70,12 @@ else DISABLE_OCCVIEWER="yes" fi +if test "x${enable_HDF}" != "xno" ; then + DISABLE_HDF="no" +else + DISABLE_HDF="yes" +fi + if test "x${enable_vtkViewer}" != "xno" ; then DISABLE_VTKVIEWER="no" else @@ -417,6 +423,15 @@ echo CHECK_OCCVIEWER echo "DISABLE_OCCVIEWER = "$DISABLE_OCCVIEWER +echo +echo --------------------------------------------- +echo Testing HDF +echo --------------------------------------------- +echo + +CHECK_HDF +echo "DISABLE_HDF = "$DISABLE_HDF + echo echo --------------------------------------------- echo Testing VTKViewer @@ -465,6 +480,10 @@ if test "x${GUI_DISABLE_CORBA}" != "xyes" ; then echo "failed : for full configuration of GUI module necessary enable OCCViewer !" exit fi + if test "x${DISABLE_HDF}" == "xyes" ; then + echo "failed : for full configuration of GUI module necessary enable HDF !" + exit + fi if test "x${DISABLE_VTKVIEWER}" == "xyes" ; then echo "failed : for full configuration of GUI module necessary enable VTKViewer !" exit @@ -572,6 +591,7 @@ AM_CONDITIONAL(ENABLE_GRAPHICSVIEW, [test "$DISABLE_GRAPHICSVIEW" = no]) AM_CONDITIONAL(ENABLE_PLOT2DVIEWER, [test "$DISABLE_PLOT2DVIEWER" = no]) AM_CONDITIONAL(ENABLE_SUPERVGRAPHVIEWER, [test "$DISABLE_SUPERVGRAPHVIEWER" = no]) AM_CONDITIONAL(ENABLE_OCCVIEWER, [test "$DISABLE_OCCVIEWER" = no]) +AM_CONDITIONAL(ENABLE_HDF, [test "$DISABLE_HDF" = no]) AM_CONDITIONAL(ENABLE_VTKVIEWER, [test "$DISABLE_VTKVIEWER" = no]) AM_CONDITIONAL(ENABLE_SALOMEOBJECT, [test "$DISABLE_SALOMEOBJECT" = no]) AM_CONDITIONAL(ENABLE_QXGRAPHVIEWER, [test "$DISABLE_QXGRAPHVIEWER" = no]) diff --git a/src/LightApp/LightApp_HDFDriver.cxx b/src/LightApp/LightApp_HDFDriver.cxx index 92883e834..1fcfcd5c0 100644 --- a/src/LightApp/LightApp_HDFDriver.cxx +++ b/src/LightApp/LightApp_HDFDriver.cxx @@ -379,4 +379,4 @@ bool LightApp_HDFDriver::ReadDatasFromFile( const char* theFileName, bool isMult return !isError; } -#endif //DISABLE_HDF \ No newline at end of file +#endif //DISABLE_HDF diff --git a/src/LightApp/LightApp_HDFDriver.h b/src/LightApp/LightApp_HDFDriver.h index ca257ddb1..de377d728 100644 --- a/src/LightApp/LightApp_HDFDriver.h +++ b/src/LightApp/LightApp_HDFDriver.h @@ -43,4 +43,4 @@ public: #endif -#endif //DISABLE_HDF \ No newline at end of file +#endif //DISABLE_HDF diff --git a/src/LightApp/Makefile.am b/src/LightApp/Makefile.am index b2e6bae05..98d736362 100755 --- a/src/LightApp/Makefile.am +++ b/src/LightApp/Makefile.am @@ -163,7 +163,7 @@ nodist_salomeres_DATA = \ LightApp_msg_fr.qm libLightApp_la_CPPFLAGS = $(PYTHON_INCLUDES) $(QT_INCLUDES) $(CAS_CPPFLAGS) \ - $(HDF5_INCLUDES) @KERNEL_CXXFLAGS@ -I$(srcdir)/../SUIT -I$(srcdir)/../STD \ + @KERNEL_CXXFLAGS@ -I$(srcdir)/../SUIT -I$(srcdir)/../STD \ -I$(srcdir)/../CAM -I$(srcdir)/../ObjBrowser -I$(srcdir)/../LogWindow \ -I$(srcdir)/../Prs -I$(srcdir)/../Qtx -I$(srcdir)/../Event -I$(srcdir)/../Style libLightApp_la_LDFLAGS = $(QT_MT_LIBS) @@ -183,6 +183,11 @@ if ENABLE_OCCVIEWER else !ENABLE_OCCVIEWER libLightApp_la_CPPFLAGS += -DDISABLE_OCCVIEWER endif +if ENABLE_HDF + libLightApp_la_CPPFLAGS += $(HDF5_INCLUDES) +else !ENABLE_HDF + libLightApp_la_CPPFLAGS += -DDISABLE_HDF +endif if ENABLE_PYCONSOLE libLightApp_la_CPPFLAGS += $(PYTHON_INCLUDES) -I$(srcdir)/../PyConsole -I$(srcdir)/../PyInterp libLightApp_la_LDFLAGS += $(PYTHON_LIBS) @@ -230,9 +235,8 @@ endif libLightApp_la_LIBADD = ../SUIT/libsuit.la ../STD/libstd.la ../CAM/libCAM.la \ ../LogWindow/libLogWindow.la $(CAS_KERNEL) \ ../Prs/libSalomePrs.la ../ObjBrowser/libObjBrowser.la ../Style/libSalomeStyle.la \ - ../Event/libEvent.la \ - $(HDF5_LIBS) $(KERNEL_LDFLAGS) -lSalomeHDFPersist - + ../Event/libEvent.la + if ENABLE_SALOMEOBJECT libLightApp_la_LIBADD += ../OBJECT/libSalomeObject.la endif @@ -242,6 +246,11 @@ if ENABLE_SALOMEOBJECT libLightApp_la_LIBADD += ../SVTK/libSVTK.la endif endif + +if ENABLE_HDF + libLightApp_la_LIBADD += $(HDF5_LIBS) $(KERNEL_LDFLAGS) -lSalomeHDFPersist +endif + if ENABLE_OCCVIEWER libLightApp_la_LIBADD += ../OCCViewer/libOCCViewer.la if ENABLE_SALOMEOBJECT -- 2.39.2