diff options
author | Ken Martin <ken.martin@kitware.com> | 2002-09-11 16:52:11 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2002-09-11 16:52:11 (GMT) |
commit | 19323b6bac3cd4a6fba8b3fd8df9a452d2ffe486 (patch) | |
tree | 13c4b2ae3279b9bf55f5c853b9961d78012fa0e3 /Source/cmMakefile.cxx | |
parent | b9db890ebc8a5c900439c23cf7bdaa44721a35c3 (diff) | |
download | CMake-19323b6bac3cd4a6fba8b3fd8df9a452d2ffe486.zip CMake-19323b6bac3cd4a6fba8b3fd8df9a452d2ffe486.tar.gz CMake-19323b6bac3cd4a6fba8b3fd8df9a452d2ffe486.tar.bz2 |
minor fix in try compile code
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index e8da4dc..ae9b362 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1332,12 +1332,6 @@ void cmMakefile::ExpandSourceListArguments( int cmMakefile::TryCompile(const char *srcdir, const char *bindir, const char *projectName, const char *targetName) { - if (!m_LocalGenerator) - { - cmSystemTools::Error("Internal CMake error, Attempt to call Try Compile without the generator being set"); - return 1; - } - // does the binary directory exist ? If not create it... if (!cmSystemTools::FileIsDirectory(bindir)) { @@ -1355,7 +1349,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir, std::string cmakeCommand = this->GetDefinition("CMAKE_COMMAND"); cmake cm; cmGlobalGenerator *gg = - cm.CreateGlobalGenerator(this->GetDefinition("CMAKE_GENERATOR")); + cm.CreateGlobalGenerator(this->m_LocalGenerator->GetGlobalGenerator()->GetName()); if (!gg) { cmSystemTools::Error( @@ -1364,6 +1358,7 @@ int cmMakefile::TryCompile(const char *srcdir, const char *bindir, cmSystemTools::ChangeDirectory(cwd.c_str()); return 1; } + cm.SetGlobalGenerator(gg); // do a configure cm.SetHomeDirectory(srcdir); |