[CMake] Removing the first element from a list

Josef Karthauser joe.karthauser at geomerics.com
Thu Oct 11 11:15:34 EDT 2007


How does one go about removing the first element of a list?  I want to
make a state machine, something like:

	WHILE(${LISTVAR})
		# Get command from first entry
		SHIFT(CMD ${LISTVAR})

		# Get argument
		SHIFT(CMD ${LISTVAR}

		# Consume .....
	ENDWHILE()

Where SHIFT is the magic to remove the first element from the list.

Joe


More information about the CMake mailing list