Óscar Fuentes <o...@wanadoo.es> writes:

> Andreas Pakulat <ap...@gmx.de> writes:
>
> [snip]
>
>> add_custom_command( OUTPUT build.h
>>                     COMMAND cmake -E echo \"\#define FOO \\"bar\\"\" 
>> >build.h )
>
> Well, it even makes sense, although it is not immediately
> obvious. Thanks!

I spoke too soo. This command:

add_custom_command(OUTPUT buildobj.h
  COMMAND ${CMAKE_COMMAND} -E echo \"\#define BUILDOBJ \\"foo bar\\"\"
  > buildobj.h
  )

works fine on Windows. But on Linux it the file contents are this:

#define BUILDOBJ "foo\ bar"

This is quoting hell. Back to configure_file.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to