Oh! I missed the “toolchain” part, sorry . Yes, the file I linked to is only run at compiler detection time, so yes, it is unavailable to toolchain files. That said, I don’t know how much more work that variable is going to carry, so the CMAKE_GENERATOR-based detection is likely the way to go.