On 29. Jul, 2010, at 6:37 , Óscar Fuentes wrote:

> Michael Wild <them...@gmail.com> writes:
> 
> [snip]
> 
>> Perhaps you need to tell us what it is that you are trying to achieve,
>> because I suspect that you are over-thinking things and that there is
>> a much simpler solution. E.g. what should buildobj.h contain
>> (semantically, not the exact strings), and why is it only known at
>> build time?
> 
> I "solved" this specific instance with configure_file. It is not as
> convenient as the original add_custom_command method but it works.
> 
> What really concerns me is the general problem: a CMake command that
> acts on a platform-dependent way when the existence of those "-E"
> commands are motivated, precisely, for the cross-platform nature of
> CMake. Maybe I should file a bug report and see how it fares.

The problem is, CMake has to go through the system shell. Of course, CMake 
could write the command to a file and then invoke a custom interpreter from the 
system shell, but that would probably be very inefficient and would require 
CMake to implement a full shell language. And then CMake would be required to 
decide which semantics to implement (probably POSIX) and then Windows-only 
people would be angry...

But we still don't know what your general goal is, WHY you need this and why 
e.g. a simple add_definitions() isn't enough (because so far I haven't seen 
anything that requires you to do this stuff dynamically at build-time).

Michael

_______________________________________________
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