summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNMakeMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2002-12-04 15:57:22 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2002-12-04 15:57:22 (GMT)
commit1e8914ada8834a9ed6e3a10a8575c14947df157e (patch)
tree3d84c1cdff204fb3025f0d1af5762d5c02d6872c /Source/cmGlobalNMakeMakefileGenerator.cxx
parent3a211819410ba0433cf8b713e894683b2f612345 (diff)
downloadCMake-1e8914ada8834a9ed6e3a10a8575c14947df157e.zip
CMake-1e8914ada8834a9ed6e3a10a8575c14947df157e.tar.gz
CMake-1e8914ada8834a9ed6e3a10a8575c14947df157e.tar.bz2
BUG: fix get make command problems.
Diffstat (limited to 'Source/cmGlobalNMakeMakefileGenerator.cxx')
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx
index 114876f..318b428 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.cxx
+++ b/Source/cmGlobalNMakeMakefileGenerator.cxx
@@ -24,9 +24,14 @@ void cmGlobalNMakeMakefileGenerator::EnableLanguage(const char* l,
// pick a default
mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
- std::string setMakeProgram = mf->GetDefinition("CMAKE_ROOT");
- setMakeProgram += "/Modules/CMakeNMakeFindMake.cmake";
- mf->ReadListFile(0, setMakeProgram.c_str());
+ if(!mf->GetDefinition("CMAKE_MAKE_PROGRAM")
+ || cmSystemTools::IsOff(mf->GetDefinition("CMAKE_MAKE_PROGRAM")))
+ {
+ std::string setMakeProgram = mf->GetDefinition("CMAKE_ROOT");
+ setMakeProgram += "/Modules/CMakeNMakeFindMake.cmake";
+ mf->ReadListFile(0, setMakeProgram.c_str());
+ }
+
this->cmGlobalUnixMakefileGenerator::EnableLanguage(l, mf);
}