summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx
index 446881b..c353916 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);
}