From 152fccf848b9d9df5f2ee19e8886ed68eb94732a Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 27 Aug 2001 11:03:41 -0400 Subject: [PATCH] BUG: set CXX and CC when running configure from cmake --- Source/cmUnixMakefileGenerator.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 209765bf1..8b93f11b2 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 ";