ENH: make it submit to cdash
[cmake.git] / Source / cmGlobalNMakeMakefileGenerator.cxx
blob4dd22d1af94f0bb6434e3f0edfb1e0e485c9fa9d
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmGlobalNMakeMakefileGenerator.cxx,v $
5 Language: C++
6 Date: $Date: 2008-10-14 15:42:45 $
7 Version: $Revision: 1.27 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #include "cmGlobalNMakeMakefileGenerator.h"
18 #include "cmLocalUnixMakefileGenerator3.h"
19 #include "cmMakefile.h"
21 cmGlobalNMakeMakefileGenerator::cmGlobalNMakeMakefileGenerator()
23 this->FindMakeProgramFile = "CMakeNMakeFindMake.cmake";
24 this->ForceUnixPaths = false;
25 this->ToolSupportsColor = true;
26 this->UseLinkScript = false;
29 void cmGlobalNMakeMakefileGenerator
30 ::EnableLanguage(std::vector<std::string>const& l,
31 cmMakefile *mf,
32 bool optional)
34 // pick a default
35 mf->AddDefinition("CMAKE_GENERATOR_CC", "cl");
36 mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl");
37 if(!(cmSystemTools::GetEnv("INCLUDE") &&
38 cmSystemTools::GetEnv("LIB") &&
39 cmSystemTools::GetEnv("LIBPATH"))
42 std::string message = "To use the NMake generator, cmake must be run "
43 "from a shell that can use the compiler cl from the command line. "
44 "This environment does not contain INCLUDE, LIB, or LIBPATH, and "
45 "these must be set for the cl compiler to work. ";
46 mf->IssueMessage(cmake::WARNING,
47 message);
50 this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional);
53 ///! Create a local generator appropriate to this Global Generator
54 cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator()
56 cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
57 lg->SetDefineWindowsNULL(true);
58 lg->SetWindowsShell(true);
59 lg->SetMakeSilentFlag("/nologo");
60 lg->SetGlobalGenerator(this);
61 lg->SetIgnoreLibPrefix(true);
62 lg->SetPassMakeflags(true);
63 lg->SetNMake(true);
64 lg->SetUnixCD(false);
65 return lg;
68 //----------------------------------------------------------------------------
69 void cmGlobalNMakeMakefileGenerator
70 ::GetDocumentation(cmDocumentationEntry& entry) const
72 entry.Name = this->GetName();
73 entry.Brief = "Generates NMake makefiles.";
74 entry.Full = "";