Ban variables with integers-for-names
Yet again I have had to debug some truly weird behavior that was caused by bad variable name manipulation elsewhere in the code that looked like:
try_compile(result …)
if (blah)
set(${result} 0 CACHE INTERNAL …)
else ()
set(${result} 1 CACHE INTERNAL …)
endif ()
which ends up setting a variable in the cache named 0
or 1
(based on the result). There should be a policy to deny setting any variable name that is also an integer to stop these kinds of things once and for all.