Alan,

Do you concur the following is a real problem?

 <<CMakeLists.txt>> #
# Possible bug in cmake version 2.4-patch 6 where macro arguments
# don't test correctly. When run this produces:
#
#       mytrue=TRUE [msg1]
#       MYMACRO(TRUE)
#       boolarg=TRUE [False path]
#       _var=TRUE [True path]
#

MACRO (MYMACRO boolarg)
        MESSAGE ("MYMACRO(${boolarg})")
        IF (boolarg)
                MESSAGE ("boolarg=${boolarg} [True path]")
        ELSE (boolarg)
                MESSAGE ("boolarg=${boolarg} [False path]")
        ENDIF (boolarg)

        SET (_var ${boolarg})
        IF (_var)
                MESSAGE ("_var=${_var} [True path]")
        ELSE (_var)
                MESSAGE ("_var=${_var} [False path]")
        ENDIF (_var)
ENDMACRO (MYMACRO boolarg)

SET (mytrue TRUE)
IF (mytrue)
        MESSAGE ("mytrue=${mytrue} [msg1]")
ELSE (mytrue)
        MESSAGE ("mytrue=${mytrue} [msg2]")
ENDIF (mytrue)

MYMACRO(${mytrue})
 
#
# Possible bug in cmake version 2.4-patch 6 where macro arguments
# don't test correctly. When run this produces:
#
#       mytrue=TRUE [msg1]
#       MYMACRO(TRUE)
#       boolarg=TRUE [False path]
#       _var=TRUE [True path]
#

MACRO (MYMACRO boolarg)
        MESSAGE ("MYMACRO(${boolarg})")
        IF (boolarg)
                MESSAGE ("boolarg=${boolarg} [True path]")
        ELSE (boolarg)
                MESSAGE ("boolarg=${boolarg} [False path]")
        ENDIF (boolarg)

        SET (_var ${boolarg})
        IF (_var)
                MESSAGE ("_var=${_var} [True path]")
        ELSE (_var)
                MESSAGE ("_var=${_var} [False path]")
        ENDIF (_var)
ENDMACRO (MYMACRO boolarg)

SET (mytrue TRUE)
IF (mytrue)
        MESSAGE ("mytrue=${mytrue} [msg1]")
ELSE (mytrue)
        MESSAGE ("mytrue=${mytrue} [msg2]")
ENDIF (mytrue)

MYMACRO(${mytrue})

_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to