[Cmake] FILE command

John Biddiscombe john . biddiscombe at mirada-solutions . com
Fri, 18 Jul 2003 08:57:51 +0100


got a bounce from cmake.org, trying www.cmake.org instead...

> -----Original Message-----
> From: John Biddiscombe=20
> Sent: 18 July 2003 08:56
> To: 'Andy Cedilnik'; Brad King
> Cc: CMake
> Subject: RE: [Cmake] FILE command
>=20
>=20
> Superb, thanks. I've just updated from cvs and the=20
>=20
> FILE(WRITE filename AVersionNumber)
> ...
> FILE(READ filename AnotherVersionNumber)
>=20
> STRING(COMPARE EQUAL "${AnotherVersionNumber}"=20
> "${AVersionNumber}" UPTODATE)
>=20
> is working as I'd expected.
>=20
> ....
>=20
> > So, any thought of FILE(READ?
>=20
> well. It seems to be fine from my point of view now. Is it=20
> adding a CR/LF, if so, it shouldn't really.
>=20
> I would like to add a couple of new STRING commands...
>=20
> STRING(NUMBEROFLINES ABIGSTRING N)  would set N to the number of lines
> STRING(LINE N stringin result)      would extract the N'th=20
> line into a new variable
>=20
> and would allow looping over a file extracting lines and getting info
> FILE(READ filename ABIGSTRING)
> STRING(NUMBEROFLINES ABIGSTRING line0)
> STRING(LINE 0 ABIGSTRING line0)
> STRING(LINE 1 ABIGSTRING line1)
> etc
>=20
> I'm looking at this because the powers that be are using a=20
> non-cmake configuration process and I would like to extract=20
> info from the config files and use it to run cmake on the system.
>=20
> is anything like this already planned. In which case would it=20
> be significantly different?
>=20
>=20
> thanks=20
>=20
> JB
>=20