[CMake] Removing the first element from a list

Josef Karthauser joe.karthauser at geomerics.com
Thu Oct 11 12:17:53 EDT 2007


> From: Sylvain Benner [mailto:benner at virtools.com]
> Sent: 11 October 2007 16:40
> To: Josef Karthauser
> Cc: cmake at cmake.org
> Subject: Re: [CMake] Removing the first element from a list
>
> 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})

Thanks muchly.

Joe


More information about the CMake mailing list