summaryrefslogtreecommitdiff
path: root/Source/cmGlobalNMakeMakefileGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-10-14 11:42:45 -0400
committerBill Hoffman <bill.hoffman@kitware.com>2008-10-14 11:42:45 -0400
commit9430c3f33591e1f9c4bb2d0d1b7fbd3486c3ff6e (patch)
tree3ec0de3b3db4240fa7b7755c3ae88181fa3aa594 /Source/cmGlobalNMakeMakefileGenerator.cxx
parent9b8d30081c66082dfc7df79ff1cc9b3348bb5308 (diff)
downloadcmake-9430c3f33591e1f9c4bb2d0d1b7fbd3486c3ff6e.tar.gz
ENH: better error message for mis-configured nmake environment
Diffstat (limited to 'Source/cmGlobalNMakeMakefileGenerator.cxx')
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx
index 446881bf20..c35391604e 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.cxx
+++ b/Source/cmGlobalNMakeMakefileGenerator.cxx
@@ -34,6 +34,19 @@ void cmGlobalNMakeMakefileGenerator
// pick a default
mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
+ if(!(cmSystemTools::GetEnv("INCLUDE") &&
+ cmSystemTools::GetEnv("LIB") &&
+ cmSystemTools::GetEnv("LIBPATH"))
+ )
+ {
+ std::string message = "To use the NMake generator, cmake must be run "
+ "from a shell that can use the compiler cl from the command line. "
+ "This environment does not contain INCLUDE, LIB, or LIBPATH, and "
+ "these must be set for the cl compiler to work. ";
+ mf->IssueMessage(cmake::WARNING,
+ message);
+ }
+
this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
}