summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-08-27 11:03:41 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2001-08-27 11:03:41 -0400
commit152fccf848b9d9df5f2ee19e8886ed68eb94732a (patch)
treee4862e4468a81c09aa464b40129d11b5f08eafa8
parentd586449a643ff97c1316b1e092b9b5b2bbac33cb (diff)
downloadcmake-152fccf848b9d9df5f2ee19e8886ed68eb94732a.tar.gz
BUG: set CXX and CC when running configure from cmake
-rw-r--r--Source/cmUnixMakefileGenerator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx
index 209765bf10..8b93f11b22 100644
--- a/Source/cmUnixMakefileGenerator.cxx
+++ b/Source/cmUnixMakefileGenerator.cxx
@@ -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 ";