[CMake] map structure on cmake script

Rodolfo Schulz de Lima rodolfo at rodsoft.org
Mon Dec 17 14:29:58 EST 2007


Alexander Neundorf escreveu:

> Yes, you can get map-like behaviour by using just variables:
> SET(MY_MAP_${KEY} myValue)

That's fine if ${KEY} doesn't have spaces nor characters that aren't 
allowed in variable names. As I'm using a string containing compiler 
flags and stuff, this solution isn't possible. A workaround would be 
computing a hash from the string and using it as a key, but once again, 
it'd be a pain in the *** to do it in cmake script.

Regards,
rod



More information about the CMake mailing list