[CMake] How to obtain date of the day

2010-08-05 Thread Jean-Christophe Fillion-Robin
hi Folks, Earlier in the day, somebody asked me how he could obtain today date using cmake. I replied there was no direct way to obtain the date and I told him to use a macro I wrote. See http://viewvc.slicer.org/viewcvs.cgi/trunk/CMake/Slicer3TodayMacro.cmake?rev=11898view=log Is there a better

Re: [CMake] How to obtain date of the day

2010-08-05 Thread Michael Wild
On 5. Aug, 2010, at 15:46 , Jean-Christophe Fillion-Robin wrote: hi Folks, Earlier in the day, somebody asked me how he could obtain today date using cmake. I replied there was no direct way to obtain the date and I told him to use a macro I wrote. See

Re: [CMake] How to obtain date of the day

2010-08-05 Thread David Cole
On Thu, Aug 5, 2010 at 9:46 AM, Jean-Christophe Fillion-Robin jchris.filli...@kitware.com wrote: hi Folks, Earlier in the day, somebody asked me how he could obtain today date using cmake. I replied there was no direct way to obtain the date and I told him to use a macro I wrote. See

Re: [CMake] How to obtain date of the day

2010-08-05 Thread Andrew Maclean
Hi All, I wrote a little c++ program that gets the date and time from the system. It just returns a UTC time: /mm/dd hhm:ss UTC. Works in Linux, Windows, MAC-OS but does use iostream and ctime. Then I have this in my CMake file: