[CMake] help using try_run with custom build type
Denis Scherbakov
denis_scherbakov at yahoo.com
Wed Jul 8 03:29:38 EDT 2009
> > 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.
Denis
More information about the CMake
mailing list