summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2002-09-13 14:41:20 (GMT)
committerKen Martin <ken.martin@kitware.com>2002-09-13 14:41:20 (GMT)
commitc1da4c9570d57f641f35038bbadb926398d4236c (patch)
treeda9433b21b671f3ca425274e86417040df1fceac /Source/cmake.cxx
parentfd49f172974c822f704150bb8bfbaf96f67141ae (diff)
downloadCMake-c1da4c9570d57f641f35038bbadb926398d4236c.zip
CMake-c1da4c9570d57f641f35038bbadb926398d4236c.tar.gz
CMake-c1da4c9570d57f641f35038bbadb926398d4236c.tar.bz2
better try compile
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 8c94405..2c86c4d 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -627,8 +627,14 @@ void cmake::SetGlobalGenerator(cmGlobalGenerator *gg)
int cmake::Configure(const char *arg0, const std::vector<std::string>* args)
{
- // Read in the cache
- m_CacheManager->LoadCache(this->GetHomeOutputDirectory());
+ // Read in the cache, but not for a try compile
+ // because there will be no cache
+ if (!m_InTryCompile)
+ {
+ m_CacheManager->LoadCache(this->GetHomeOutputDirectory());
+ }
+
+ // do a sanity check on some values
if(m_CacheManager->GetCacheValue("CMAKE_HOME_DIRECTORY"))
{
std::string cacheStart =
@@ -715,9 +721,14 @@ int cmake::Configure(const char *arg0, const std::vector<std::string>* args)
cmCacheManager::INTERNAL);
}
- // reset any system configuration information
- m_GlobalGenerator->ClearEnabledLanguages();
-
+ // reset any system configuration information, except for when we are
+ // InTryCompile. With TryCompile the system info is taken from the parent's
+ // info to save time
+ if (!m_InTryCompile)
+ {
+ m_GlobalGenerator->ClearEnabledLanguages();
+ }
+
// actually do the configure
m_GlobalGenerator->Configure();