[Cppunit-devel] Re: [cppunit - Open Discussion] RE: Why System Includes?
Brought to you by:
blep
From: Steve M. R. <ste...@vi...> - 2001-09-27 15:00:44
|
On Thu, Sep 27, 2001 at 07:43:57AM -0700, no...@so... wrote: > > Read and respond to this message at: > http://sourceforge.net/forum/message.php?msg_id=238875 > By: blep > > For the cpp file it is ok. #include <filename> states that include path indicate > with /I option are search first, then those of the environment variable. Careful -- you're getting into system-dependent behaviour here! I've never met a C compiler that used an environment variable to change the header include path! > For the header in the /include directory, it might be a problem because that > include directory may not be the one in the include paths. Then put that directory on the include path. > For example, in cppunit/extensions/HelperMacros.h, you have: > > > > #include <cppunit/Portability.h> > #include <cppunit/extensions/AutoRegisterSuite.h> > #include <cppunit/extensions/TestSuiteBuilder.h> > > > > I you replace with the quoted filename: > > #include "../Portability.h" > #include "AutoRegisterSuite.h" > #include "TestSuiteBuilder.h" > > > For AutoRegisterSuite.h and TestSuiteBuilder.h, it's ok, and actually what should > be done. But I frown upon having "../" in an include filename. Noooooo! All the headers in include/cppunit *must* include the other headers using <cppunit/...> notation. Do not even think about changing this! These headers *do* get installed into the "system" location on a unix build. -S -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |