[CMake] We shouldn't be storing values in the cache unless they actually need CMake...
authorChris Bieneman <beanz@apple.com>
Tue, 14 Jul 2015 01:17:43 +0000 (01:17 +0000)
committerChris Bieneman <beanz@apple.com>
Tue, 14 Jul 2015 01:17:43 +0000 (01:17 +0000)
commit5bd68ee9b45ed33ab4fb419d22fd453c45a96ab4
treee02f18b507fdac2303ae1590ef497b964edffda2
parentec6cc055ce621beb0a2b1c89d1a2f82c0a07003a
[CMake] We shouldn't be storing values in the cache unless they actually need CMake cache behavior.

add_llvm_external_project puts LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR into the cache even if it is just the in-tree default path. This causes all sorts of oddness, and makes it so that I can't change the behavior of this variable.

This patch never puts LLVM_EXTERNAL_${nameUPPER}_SOURCE_DIR into the cache. It will only end up in the cache if it is specified on the command line, which is the correct behavior.

There is also a temporary change to remove non-default values from the cache if they are already present. This should have the impact of cleaning out unncecissary values from the caches on the buildbots and people's local build directories. This part of the change is marked with a TODO and can be removed in a few days.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242102 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/AddLLVM.cmake