I have a stringlist (input):
set(MY_LIST "A:1;B:2;C:3")
I want to fetch the key values using foreach and set them as cmake constants. Something like:
foreach(ITEM ${MY_LIST})
SET(<ITEM_A> <value_ofA>)
endforeach()
So basically i want the end result as but this should be achieved using a forloop:
SET(A "1")
SET(B "2")
SET(C "3")
How can i achieve this by using foreach to navigate each string in my list and set the key value pairs as cmake constants?
This is not so bad:
The output is:
Might work on earlier versions, too. I keep up to date.