This matches handling of other CMake variables. Differential Revision: https://reviews.llvm.org/D110463