BUG: set CXX and CC when running configure from cmake

This commit is contained in:
Bill Hoffman 2001-08-27 11:03:41 -04:00
parent d586449a64
commit 152fccf848
1 changed files with 10 additions and 0 deletions

View File

@ -1370,6 +1370,16 @@ void cmUnixMakefileGenerator::ComputeSystemInfo()
{
if (m_CacheOnly)
{
if(m_Makefile->GetDefinition("CMAKE_CXX_COMPILER"))
{
std::string env = "CXX=${CMAKE_CXX_COMPILER}";
m_Makefile->ExpandVariablesInString(env);
putenv(env.c_str());
env = "CC=${CMAKE_C_COMPILER}";
m_Makefile->ExpandVariablesInString(env);
putenv(env.c_str());
}
// currently we run configure shell script here to determine the info
std::string output;
std::string cmd = "cd ";