[CMake] More problems with list()...

Robert Dailey rcdailey at gmail.com
Wed Dec 3 11:29:00 EST 2008


Hi,

I have the following macro:

macro( library_component project_name )
    if( ${ARGC} EQUAL 2 )
        list( GET ARGN 0 component_dependencies )
    endif()
endmacro()

I call the macro like this:

library_component( myProjectName item1 )

The conditional in the macro above checks to see if the 1st optional
argument has been specified. If so, I proceed to obtain that argument from
the ARGN list. When I use message() to print the ARGN list, I see "item1" in
the output. However, when I call list( GET ), I get NOTFOUND in the output.
Why is this not working?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081203/6d91f95a/attachment-0001.htm>


More information about the CMake mailing list