No because CMAKE_BUILD_TYPE is always defined from the first time you set it. We could however provide our own non-cache var that would be overridable but set the CMAKE_BUILD_TYPE if set.