summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-08-27 15:03:41 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-08-27 15:03:41 (GMT)
commit152fccf848b9d9df5f2ee19e8886ed68eb94732a (patch)
treee4862e4468a81c09aa464b40129d11b5f08eafa8
parentd586449a643ff97c1316b1e092b9b5b2bbac33cb (diff)
downloadCMake-152fccf848b9d9df5f2ee19e8886ed68eb94732a.zip
CMake-152fccf848b9d9df5f2ee19e8886ed68eb94732a.tar.gz
CMake-152fccf848b9d9df5f2ee19e8886ed68eb94732a.tar.bz2
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 209765b..8b93f11 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 ";