But this doesn't?

        MACRO(SHIFT RESULT LISTVAR)
        LIST(GET LISTVAR 1 RESULT)
        LIST(REMOVE_AT LISTVAR 1)
        ENDMACRO(SHIFT)

        MACRO(TEST)
        SET(Q ${ARGN})
        WHILE(${Q})
                # Get the command
                SHIFT(CMD Q)
                MESSAGE("Command was ${CMD}")
        ENDWHILE(Q)
        ENDMACRO(TEST)

        TEST(NOT A B NOT C D CLEAR)
correction:

        MACRO(SHIFT RESULT LISTVAR)
        LIST(GET ${LISTVAR} 1 ${RESULT})
        LIST(REMOVE_AT ${LISTVAR} 1)
        ENDMACRO(SHIFT)

rule:

Dereferencing a macro variable gives you the variable name. Dereferencing twice 
gives you the value of the passed variable.

The other way is to call your original macro like this :
SHIFT(${CMD} ${Q})


--Sylvain

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

Reply via email to