[CMake] change in behavior of CONFIGURE_FILE

Filipe Sousa filipe at ipb.pt
Tue Jun 14 14:55:05 EDT 2005


On Tuesday 14 June 2005 19:42, Bradley Lowekamp wrote:
> In the past week the behavior of this code has changed : )
>
> PROJECT(TEST5)
>
> CONFIGURE_FILE(${TEST5_SOURCE_DIR}/configure.h.in
> 				${TEST5_BINARY_DIR}/configure.h)
>
> SET(USE_FEATURE ON)
>
> ##### configure.h.in
> #cmakedefine USE_FEATURE
>
> A week ago USE_FEATURE would be defined. But now it is not. I have been
> encountering many unexpected changes in behavior that are time
> consuming in tracking down some times. Am I missing some place where
> these changes are being posted? Perhaps there should be some place for
> this?
>

http://public.kitware.com/pipermail/cmake/2005-June/006576.html

"4) Change CONFIGURE_FILE to be immediate.  In CMake 2.0 and earlier
CONFIGURE_FILE defaulted to configuring in the final pass (when all the
initial processing has been completed). It had an IMMEDIATE option that
could be used to make it configure the file immediately. In CMake 2.2 I'd
like to make CONFIGURE_FILE always be IMMEDIATE. If you set
CMAKE_BACKWARDS_COMPATIBILITY to 2.0 or earlier it will still work the old
way. The motivation for this is that people expect CONFIGURE_FILE (and most
all commands) to happen immediately. For example, people expect the
following code to work:

FOREACH (FOO 1 2 3)
  CONFIGURE_FILE (Test${FOO})
ENDFOREACH(FOO)

But because of CONFIGURE_FILE's delayed behavior it actually will only
configure the last file Test3. Because that is the value that FOO is at when
processing the CMakeLists file is complete. Any opinions on this change?"

> Thanks,
> Brad
>
> ========================================================
> Bradley Lowekamp
> Management Systems Designers Contractor for
> Office of High Performance Computing and Communications
> National Library of Medicine
> 'blowekamp at mail.nih.gov
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

-- 
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20050614/3e3d200c/attachment.pgp


More information about the CMake mailing list