diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-10-14 15:42:45 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-10-14 15:42:45 (GMT) |
commit | 9430c3f33591e1f9c4bb2d0d1b7fbd3486c3ff6e (patch) | |
tree | 3ec0de3b3db4240fa7b7755c3ae88181fa3aa594 /Source | |
parent | 9b8d30081c66082dfc7df79ff1cc9b3348bb5308 (diff) | |
download | CMake-9430c3f33591e1f9c4bb2d0d1b7fbd3486c3ff6e.zip CMake-9430c3f33591e1f9c4bb2d0d1b7fbd3486c3ff6e.tar.gz CMake-9430c3f33591e1f9c4bb2d0d1b7fbd3486c3ff6e.tar.bz2 |
ENH: better error message for mis-configured nmake environment
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGlobalNMakeMakefileGenerator.cxx | 13 |
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); } |