From 6c101bd13d9bcdb0276f326eaa22e49a58069900 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 29 May 2006 11:56:02 +0000 Subject: [PATCH] Fix KERNEL compilation problem in light mode (without CORBA) if cppunit package is installed (avoid compilation of CORBA-based tests) --- src/Makefile.am | 2 ++ src/UnitTests/Makefile.am | 22 ++++++++++++++-------- src/UnitTests/UnitTests.cxx | 7 ++++++- 3 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 2a46496ef..9916eee56 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -110,6 +110,8 @@ endif if CPPUNIT_IS_OK SUBDIRS += $(SUBDIR_CPPUNIT_BASE) +if CORBA_GEN SUBDIRS += $(SUBDIR_CPPUNIT_CORBA) +endif SUBDIRS += $(SUBDIR_CPPUNIT_GENERAL) endif diff --git a/src/UnitTests/Makefile.am b/src/UnitTests/Makefile.am index 47ed61596..b55f3b89d 100644 --- a/src/UnitTests/Makefile.am +++ b/src/UnitTests/Makefile.am @@ -49,24 +49,31 @@ UnitTests_CPPFLAGS =\ @CPPUNIT_INCLUDES@ \ -I$(srcdir)/../Basics -I$(srcdir)/../Basics/Test \ -I$(srcdir)/../SALOMELocalTrace -I$(srcdir)/../SALOMELocalTrace/Test \ + -I$(top_builddir)/salome_adm/unix + +if CORBA_GEN + UnitTests_CPPFLAGS +=\ + -DWITH_CORBA \ -I$(srcdir)/../SALOMETraceCollector -I$(srcdir)/../SALOMETraceCollector/Test \ -I$(srcdir)/../NamingService -I$(srcdir)/../NamingService/Test \ -I$(srcdir)/../Utils -I$(srcdir)/../Utils/Test \ - -I$(srcdir)/../Registry \ - -I$(srcdir)/../Notification \ - -I$(srcdir)/../ResourcesManager \ -I$(srcdir)/../LifeCycleCORBA -I$(srcdir)/../LifeCycleCORBA/Test \ -I$(srcdir)/../SALOMDESImpl -I$(srcdir)/../SALOMEDSImpl/Test \ -I$(srcdir)/../SALOMDES -I$(srcdir)/../SALOMEDS/Test \ - -I$(top_builddir)/salome_adm/unix \ -I$(top_builddir)/idl \ + -I$(srcdir)/../Registry \ + -I$(srcdir)/../Notification \ + -I$(srcdir)/../ResourcesManager \ @CORBA_CXXFLAGS@ @CORBA_INCLUDES@ - +endif UnitTests_LDADD =\ @CPPUNIT_LIBS@ \ ../Basics/libSALOMEBasics.la \ - ../SALOMELocalTrace/libSALOMELocalTrace.la ../SALOMELocalTrace/Test/libSALOMELocalTraceTest.la \ + ../SALOMELocalTrace/libSALOMELocalTrace.la ../SALOMELocalTrace/Test/libSALOMELocalTraceTest.la + +if CORBA_GEN + UnitTests_LDADD +=\ ../Registry/libRegistry.la \ ../Notification/libSalomeNotification.la \ ../ResourcesManager/libSalomeResourcesManager.la \ @@ -79,5 +86,4 @@ UnitTests_LDADD =\ ../SALOMEDS/libSalomeDS.la ../SALOMEDS/Test/libSALOMEDSTest.la \ $(top_builddir)/idl/libSalomeIDLKernel.la\ @CORBA_LIBS@ - - +endif diff --git a/src/UnitTests/UnitTests.cxx b/src/UnitTests/UnitTests.cxx index ef7006a86..ed5ea9b5d 100644 --- a/src/UnitTests/UnitTests.cxx +++ b/src/UnitTests/UnitTests.cxx @@ -21,22 +21,27 @@ // --- include all Unit Test from basics until the present directory #include "SALOMELocalTraceTest.hxx" + +#ifdef WITH_CORBA #include "SALOMETraceCollectorTest.hxx" #include "UtilsTest.hxx" #include "NamingServiceTest.hxx" #include "LifeCycleCORBATest.hxx" #include "SALOMEDSImplTest.hxx" #include "SALOMEDSTest.hxx" +#endif // --- Registers the fixture into the 'registry' CPPUNIT_TEST_SUITE_REGISTRATION( SALOMELocalTraceTest ); +#ifdef WITH_CORBA CPPUNIT_TEST_SUITE_REGISTRATION( SALOMETraceCollectorTest ); CPPUNIT_TEST_SUITE_REGISTRATION( UtilsTest ); CPPUNIT_TEST_SUITE_REGISTRATION( NamingServiceTest ); CPPUNIT_TEST_SUITE_REGISTRATION( LifeCycleCORBATest ); CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSImplTest ); -CPPUNIT_TEST_SUITE_REGISTRATION(SALOMEDSTest ); +CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSTest ); +#endif // --- generic Main program from Basic/Test -- 2.39.2