So if I understand correctly…
-
FindFLEX sets FLEX_INCLUDE_DIRS as a non-cache variable;
-
I’m then setting it as a cache variable (because I want to use it globally without having to promote it up a couple of levels using PARENT_SCOPE)
-
But when I try to access the variable normally using ${FLEX_INCLUDE_DIRS}, I’m seeing the non-cache variable defined by FindFLEX, rather than the cache variable I defined myself?
If so I’m still puzzled, because I can’t see anything in FindFLEX.cmake that raises FLEX_INCLUDE_DIRS to the parent scope, and the place where I actually want to invoke it is another level up again.
But am I on the right track?