[CMake] Is there a @configure_inout@ -like thing?

Brad King brad.king at kitware.com
Mon Jul 17 09:50:42 EDT 2006


Erk wrote:
> I'm switching from autotools to cmake.
> I did found everything I want but the
> @configure_input@ thing.
> 
> For emulating my custom configure-generated file
> I use the CMake  CONFIGURE_FILE which is
> just fine.
> 
> Nevertheless I found interesting the predefined
> @configure_input@ predefined autoconf var
> which is automagically substituted with
> 
> "<output_filename> Generated from <input_filename> by configure"
> 
> I emulated this by defining:
> 
> MACRO(CONFIGURE_FILE_AUTOTOOLS_COMPAT)
>  SET(configure_input "${ARGV1} generated from ${ARGV0} by CMake.")
>  CONFIGURE_FILE(${ARGV})
> ENDMACRO(CONFIGURE_FILE_AUTOTOOLS_COMPAT)
> 
> and using
> CONFIGURE_FILE_AUTOTOOLS_COMPAT
> instead of
> CONFIGURE_FILE
> 
> Is there a more "CMake" way to do this?

No, creating your own macro for this is the most CMake way currently
possible.

-Brad



More information about the CMake mailing list