[Cmake] EXEC_PROGRAM and it's output variable

William A. Hoffman billlist at nycap.rr.com
Fri, 06 Feb 2004 11:19:15 -0500


If the MESSAGE(${BUILD_DATA}) works, then there must be something
wrong with the CONFIGURE_FILE call or input.  Since, you did not
provide that code, it will be hard to say exactly what is wrong.


-Bill


At 10:50 AM 2/6/2004, Terry Lorber wrote:
>I'm try to use EXEC_PROGRAM to store the current date.  I'm calling it like this (on cygwin) in my topmost CMakeLists.txt file:
>
>EXEC_PROGRAM(date
>  ARGS +%Y%m%d
>  OUTPUT_VARIABLE BUILD_DATE
>)
>
>If I call MESSAGE(${BUILD_DATE}) in the same CMakeLists.txt, I see the value I want.  However, using ${BUILD_DATE} in an input file for CONFIGURE_FILE, results with no value being returned.  If I do SET(BUILD_DATE "20040206") in the value being passed through to the output file.
>
>What's to do?
>
>Thanks,
>tgl
>-- 
>Atlantis Components Inc     270 Third St
>617.661.9799x248            Cambridge MA  02142
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at www.cmake.org
>http://www.cmake.org/mailman/listinfo/cmake