[CMake] foreach: bug or feature?

Andreas Pakulat apaku at gmx.de
Wed Apr 29 08:14:56 EDT 2009


On 29.04.09 13:56:12, Marcel Loose wrote:
> Hi all,
> 
> foreach(cnt RANGE 3 1)
>   message(STATUS "${cnt}")
> endforeach(cnt RANGE 3 1)
> 
> produces the output
> -- 3
> -- 2
> -- 1
> 
> Apparently, CMake decides to count backward whenever stop > start.
> 
> I find this a little counter-intuitive;

I find this rather intuitive. Its still a valid range.

I'm assuming you've stumbled over this will looking for the cause of a
problem you have? Can you explain what problem that is?

Andreas

-- 
Change your thoughts and you change your world.


More information about the CMake mailing list