[CMake] configure_file behaves differently on Mac and Linux?
Bill Hoffman
bill.hoffman at kitware.com
Thu Oct 22 17:51:41 EDT 2009
James Bigler wrote:
> Has the requirements to configure_file changed? From the 2.6.4 docs:
>
> configure_file
> Copy a file to another location and modify its contents.
>
> configure_file(InputFile OutputFile
> [COPYONLY] [ESCAPE_QUOTES] [@ONLY])
>
> The Input and Output files have to have full paths. ...
>
> Perhaps it needs to warn when not using full paths (if that case can be
> detected).
So, in 2.8 and newer the current binary directory will be used for the
output file if it is not a full path. For maximum compatibility with
all versions of CMake full paths should be used for all of these. I
have closed the bug. I think the current working directory must be
different on mac for some reason. Anyway, I think that is why the docs
were changed.
-Bill
More information about the CMake
mailing list