ENH: mark some vars as advanced (and resort the list)
[cmake.git] / Source / cmBuildCommand.cxx
blob8b702049167a6033825ce8ca2a7da91c9aef2f8b
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmBuildCommand.cxx,v $
5 Language: C++
6 Date: $Date: 2002-03-05 23:41:20 $
7 Version: $Revision: 1.14 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 "cmBuildCommand.h"
19 // cmBuildCommand
20 bool cmBuildCommand::InitialPass(std::vector<std::string> const& args)
22 if(args.size() < 2 )
24 this->SetError("called with incorrect number of arguments");
25 return false;
27 const char* define = args[0].c_str();
28 const char* cacheValue
29 = m_Makefile->GetDefinition(define);
30 if(cacheValue)
32 return true;
34 std::string makecommand;
35 std::string makeprogram = args[1];
36 if(makeprogram.find("msdev") != std::string::npos ||
37 makeprogram.find("MSDEV") != std::string::npos )
39 makecommand = "\"";
40 makecommand += makeprogram;
41 makecommand += "\"";
42 makecommand += " ";
43 makecommand += m_Makefile->GetProjectName();
44 makecommand += ".dsw /MAKE \"ALL_BUILD - Release\" ";
46 else if (makeprogram.find("devenv") != std::string::npos ||
47 makeprogram.find("DEVENV") != std::string::npos )
49 makecommand = "\"";
50 makecommand += makeprogram;
51 makecommand += "\"";
52 makecommand += " ";
53 makecommand += m_Makefile->GetProjectName();
54 makecommand += ".sln /build Release /project ALL_BUILD";
56 else if(m_Makefile->GetDefinition("BORLAND"))
58 makecommand = makeprogram;
59 makecommand += " -i";
61 else
63 makecommand = makeprogram;
64 makecommand += " -i";
66 m_Makefile->AddCacheDefinition(define,
67 makecommand.c_str(),
68 "Command used to build entire project "
69 "from the command line.",
70 cmCacheManager::STRING);
71 return true;