On 02/03/2011 05:32 PM, Dominik Szczerba wrote:
> Still not sure bug or not, but trying things out blind I found a
> workaround: enclose contents of RUN_OUTPUT_VARIABLE in quotes.
> 
> Dominik
> 
> On Thu, Feb 3, 2011 at 5:24 PM, Dominik Szczerba <domi...@itis.ethz.ch> wrote:
>> I am using try_run to generate an include file by a single program
>> containing lines like:
>>
>> printf ("static double foo = %f;\n", foo);
>>
>> To my great surprise, RUN_OUTPUT_VARIABLE contains all the lines as
>> expected but without trailing ";" symbols. There is nothing about this
>> unexpected behavior in the description of this command in cmake. Did I
>> miss something in the documentation or I should rather file a bug?
>>
>> Regards,
>> Dominik


That's because ; are used as list item separator. So if you don't quote
it, CMake will see

message(STATUS ${RUN_OUTPUT_VARIABLE})

as

message(STATUS item1 item2 item3 item4)


HTH

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