On Wednesday 19 February 2003 21:24, Bob Tanner wrote: > Anyone have a HOWTO or advise on how to get cppunit and kdevelop to work > together nicely? I'm using both in a small test project. > It seems that kdevelop doesn't like to have more then 1 file with main() in > it. Yes, but it's the language you program with! C and C++ both forbid more than one main() since the loader would not find an entry point to execute the program. > It doesn't seem logical to have a seperate project for cppunit tests, so > I'm trying to figure out how to get kdevelop to compile my tests, without > complaining about the main in the application I'm testing. I created a subdirectory tests with test units and created a new target check to compile those tests separately. Here is a Makefile.am: ----------- # set the include path for X, qt and KDE INCLUDES = -I$(top_srcdir)/src $(all_includes) # these are the headers for your project noinst_HEADERS = # let automoc handle all of the meta source files (moc) METASOURCES = AUTO ######################################################################### # APPLICATION SECTION ######################################################################### # this is the program that gets installed. it's name is used for all # of the other Makefile.am variables check_PROGRAMS = gpggroup-test gpggrouplist-test gpggroup_test_SOURCES = gpggroup-test.cpp ../gpggroup.cpp gpggrouplist_test_SOURCES = gpggrouplist-test.cpp ../gpggrouplist.cpp ../gpggroup.cpp KDE_CXXFLAGS = $(USE_EXCEPTIONS) AM_CFLAGS = AM_CXXFLAGS = AM_FFLAGS = AM_LDFLAGS = $(QT_LDFLAGS) $(KDE_LDFLAGS) $(LIB_QT) $(X_LDFLAGS) $(KDE_RPATH) $(LIB_KDECORE) -lcppunit SUBDIRS = ----------- You can even create those targets with the Automake Manager for Gideon. But I did not manage to set all flags via the Manager. Hope that helps. Ciao, Matthias -- "If liberty means anything at all, it means the right to tell people what they do not want to hear." George Orwell >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<