summaryrefslogtreecommitdiffstats
path: root/Source/CMakeBuildTargets.cxx
diff options
context:
space:
mode:
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);