[CMake] Environment variable querying problem

alaterale at elitemail.org alaterale at elitemail.org
Thu May 26 12:36:25 EDT 2005


Hi,
I still seem to be getting errors (and not just syntax ones either) for
this:

##############################
IF($ENV{S5300})
        MESSAGE(STATUS "===============I pity the fool!=============")
        SET(program_name "game-prod-${program_base_name}-v7")
ENDIF($ENV{S5300})

IF($ENV{S8100})
        SET(program_name "game-prod-${program_base_name}-v12")
ENDIF($ENV{S8100})

IF($ENV{S7300})
        SET(program_name "game-prod-${program_base_name}-v24")
ENDIF($ENV{S7300})

IF(NOT ENV{S5300} AND NOT ENV{S8100} AND NOT ENV{S7300})
        MESSAGE(STATUS "==========stop yo jibba jabba============")
        SET(program_name "sony_f_en_${program_base_name}")
ENDIF(NOT ENV{S5300} AND NOT ENV{S8100} AND NOT ENV{S7300})
#########################

if you run that before you run something like "export S5300=TRUE" it
should print out the lower message because it's not defined, right?
Then after you run that export (or setenv or whatever) the first message
should print and not the other one, since it is defined.  However, this
is not what happens for some reason.  Any idea on what could be causing
this?  Is this something specific to ENV{}?  I'm trying to get the hang
of this IF statement in terms of environment variables (as those are
easier for us to set) if you can't tell :P  Any help would be greatly
appreciated :)


More information about the CMake mailing list