Hi Denis,

On Wed, Jul 8, 2009 at 2:29 AM, Denis
Scherbakov<[email protected]> wrote:
>
>> > It appears to fail because the compiler options do not
>> make it in when
>> > creating the executable ... is there something silly I
>> have missed?
>> > Also, I was wondering why TRY_RUN doesn't use the
>> default flags
>> > defined from CMAKE_BUILD_TYPE ?
>
>
>> Is this a bug or am I not using TRY_RUN correctly?
>
> I am not sure that I understood correctly, but once I had a problem passing
> compiler flags to TRY_COMPILE. I solved it by stuffing compile flags into
> CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MY_COMPILE_FLAGS}
>
> I think TRY_RUN is the same.

I'll give that a swing.

I guess I expected when I passed -D"CMAKE_BUILD_TYPE:STRING=<my build
type>" on the command line ... the compilation flags for that build
type would be used in the TRY_* calls  and anything passed in via
COMPILE_DEFINITIONS would just be additional flags.  Apparently that's
not the case! :)

Thanks much,
George
_______________________________________________
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