[CMake] Re: set variable in if block
Juan Sanchez
Juan.Sanchez at amd.com
Mon Jul 30 12:29:14 EDT 2007
My apologies, it turns out there was a syntax error, that was not fatal,
and not mentioned in the debug output.
Thanks,
Juan
Juan Sanchez wrote:
> Hello,
>
> I am trying to set a variable in an IF block, but it doesn't appear in
> the resulting cache or makefile. This is on Linux. Note that when I
> run cmake, the ${OSNAME} variable is printed, but the ${FOOBAR} variable
> ends up blank.
>
> Thanks,
>
> Juan
>
> IF (${OSNAME} STREQUAL "Linux64")
> MESSAGE ("${OSNAME}")
> SET (FOOBAR "-m64 -Wall -fPIC -I${PERLLIB} -I${PSTORE}/include")
> ENDIF (${OSNAME} STREQUAL "Linux64")
>
> MESSAGE ( "COMPILE_FLAGS ${FOOBAR}")
>
--
Juan Sanchez
Juan.Sanchez at amd.com
800-538-8450 Ext. 54395
512-602-4395
More information about the CMake
mailing list