[Cmake] CMSYSTEMTOOLS_STANDALONE
John Biddiscombe
jbiddiscombe at skippingmouse.co.uk
Thu Nov 28 09:28:17 EST 2002
I wanted to use some of the useful functions present in cmSystemTools in
another project (not CMake), but found I needed to pull in quite a few other
files as well.
I've added
#ifndef CMSYSTEMTOOLS_STANDALONE
#endif // CMSYSTEMTOOLS_STANDALONE
around a number of functions in cmSystemTools.cxx and .h so that I can
define this flag and use the string/directory/other functions without
pulling in cmMakefile etc. The number of places where it was needed was
fairly small, as it tuns out.
The way I've done it I need
cmSystemTools
cmRegularExpression
cmDirectory
in my external project, which seems quite tidy.
I have #ifndef'd out the FindLibrary function because it uses cmMakefile,
and the RunCommand because it pulls in cmWin32ProcessExecution. However, the
run commmand looks quite useful and I wonder if maybe I ought to put it back
in.
Anyway. I feel this is a good thing, but won't commit it if people object.
Comments?
JB
More information about the CMake
mailing list