string(TOUPPER CACHE x) set(y "string") swap(x y) # CMake Error... set given invalid arguments for CACHE mode.