summaryrefslogtreecommitdiffstats
path: root/Source/CMakeBuildTargets.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-05-17 16:08:46 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-05-17 16:08:46 (GMT)
commitaa72e182fe88aeacb4a812c1041499973922d3cd (patch)
tree34b6e83f91a1427718f1d68f4cbc323d76c2b8db /Source/CMakeBuildTargets.cxx
parente093e4a4e001cd620e36d30eb05d44210117e6f9 (diff)
downloadCMake-aa72e182fe88aeacb4a812c1041499973922d3cd.zip
CMake-aa72e182fe88aeacb4a812c1041499973922d3cd.tar.gz
CMake-aa72e182fe88aeacb4a812c1041499973922d3cd.tar.bz2
half checked in changes for CMAKE_ROOT
Diffstat (limited to 'Source/CMakeBuildTargets.cxx')
-rw-r--r--Source/CMakeBuildTargets.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/CMakeBuildTargets.cxx b/Source/CMakeBuildTargets.cxx
index d813f35..9d5bdb3 100644
--- a/Source/CMakeBuildTargets.cxx
+++ b/Source/CMakeBuildTargets.cxx
@@ -126,18 +126,14 @@ int main(int ac, char** av)
mf.MakeStartDirectoriesCurrent();
cmCacheManager::GetInstance()->LoadCache(&mf);
- // Make sure the internal "CMAKE" cache entry is set.
- const char* cacheValue = cmCacheManager::GetInstance()->GetCacheValue("CMAKE");
- if(!cacheValue)
- {
- // Find our own exectuable.
- std::string cMakeSelf = cmSystemTools::FindProgram(av[0]);
- // Save the value in the cache
- cmCacheManager::GetInstance()->AddCacheEntry("CMAKE",
- cMakeSelf.c_str(),
- "Path to CMake executable.",
- cmCacheManager::INTERNAL);
- }
+ // Find our own exectuable.
+ std::string cMakeSelf = cmSystemTools::FindProgram(av[0]);
+ // Save the value in the cache
+ cmCacheManager::GetInstance()->AddCacheEntry("CMAKE_COMMAND",
+ cMakeSelf.c_str(),
+ "Path to CMake executable.",
+ cmCacheManager::INTERNAL);
+ mf.SetCMakeInstallDirectory(cmSystemTools::FindProgram(av[0]));
// Transfer the cache into the makefile's definitions.
cmCacheManager::GetInstance()->DefineCache(&mf);