[Cmake] How do I force touching of an include file before build

Jan Woetzel jw at mip . informatik . uni-kiel . de
Wed, 01 Oct 2003 10:45:59 +0200


Staffan Falk (M=D6/EAB) wrote:

>Is there a simple way to force an include file to be touched before buil=
ding a target? What I really try to do is to automatically force update o=
f the __TIMESTAMP__ variable, so that I can display the build date in by =
program.
>

I guess what you really want is the date and time when you run your=20
compiler (=3D build date).
(adn not really change the file with a touch.)

You can achieve this with a preprocessor directive __FILE__ and  __LINE__=


Regards,
Jan.

--=20

  Dipl.-Ing. Jan Woetzel
--------------------------------------------------
  University of Kiel
  Institute of Computer Science and Applied Mathematics
  Hermann-Rodewald-Str. 3 [room 401]
  24098 Kiel/Germany
--------------------------------------------------
  Phone +49-431-880-1418
  Fax   +49-431-880-4054
  Mob.  +49-179-2937346
--------------------------------------------------
  Url   www.mip.informatik.uni-kiel.de/~jw
  Email jw at mip . informatik . uni-kiel . de