1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmBuildCommand.cxx,v $
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"
20 bool cmBuildCommand::InitialPass(std::vector
<std::string
> const& args
)
24 this->SetError("called with incorrect number of arguments");
27 const char* define
= args
[0].c_str();
28 const char* cacheValue
29 = m_Makefile
->GetDefinition(define
);
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
)
40 makecommand
+= makeprogram
;
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
)
50 makecommand
+= makeprogram
;
53 makecommand
+= m_Makefile
->GetProjectName();
54 makecommand
+= ".sln /build Release /project ALL_BUILD";
56 else if(m_Makefile
->GetDefinition("BORLAND"))
58 makecommand
= makeprogram
;
63 makecommand
= makeprogram
;
66 m_Makefile
->AddCacheDefinition(define
,
68 "Command used to build entire project "
69 "from the command line.",
70 cmCacheManager::STRING
);