A small cmake enhancement:
An ugly if-condition replaced with a CACHE'd cmake variable.
An ugly if condition replaced with a CACHE'd cmake variable in CMakeList.txt.