diff options
Diffstat (limited to 'Source/cmGlobalNMakeMakefileGenerator.cxx')
-rw-r--r-- | Source/cmGlobalNMakeMakefileGenerator.cxx | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index d2bd056..ce0dbd2 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -15,33 +15,25 @@ =========================================================================*/ #include "cmGlobalNMakeMakefileGenerator.h" -#include "cmLocalNMakeMakefileGenerator.h" +#include "cmLocalUnixMakefileGenerator.h" #include "cmMakefile.h" -void cmGlobalNMakeMakefileGenerator::EnableLanguage(const char*, +void cmGlobalNMakeMakefileGenerator::EnableLanguage(const char* l, cmMakefile *mf) { - // now load the settings - if(!mf->GetDefinition("CMAKE_ROOT")) - { - cmSystemTools::Error( - "CMAKE_ROOT has not been defined, bad GUI or driver program"); - return; - } - if(!this->GetLanguageEnabled("CXX")) - { - std::string fpath = - mf->GetDefinition("CMAKE_ROOT"); - fpath += "/Templates/CMakeNMakeWindowsSystemConfig.cmake"; - mf->ReadListFile(NULL,fpath.c_str()); - this->SetLanguageEnabled("CXX"); - } + // pick a default + mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); + mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); + + this->cmGlobalUnixMakefileGenerator::EnableLanguage(l, mf); } ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator() { - cmLocalGenerator *lg = new cmLocalNMakeMakefileGenerator; + cmLocalUnixMakefileGenerator *lg = new cmLocalUnixMakefileGenerator; + lg->SetWindowsShell(true); + lg->SetMakeSilentFlag("/nologo"); lg->SetGlobalGenerator(this); return lg; } |