FIX: stupid pb fixed (close to being medieval'ed by The Ken)
[cmake.git] / Source / cmAddExecutableCommand.cxx
blob4c8a82b1c61a484cf1245e27d614430f8391992f
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmAddExecutableCommand.cxx,v $
5 Language: C++
6 Date: $Date: 2002-03-29 16:11:03 $
7 Version: $Revision: 1.13 $
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 "cmAddExecutableCommand.h"
18 #include "cmCacheManager.h"
20 // cmExecutableCommand
21 bool cmAddExecutableCommand::InitialPass(std::vector<std::string> const& argsIn)
23 if(argsIn.size() < 2 )
25 this->SetError("called with incorrect number of arguments");
26 return false;
28 std::vector<std::string> args;
29 cmSystemTools::ExpandListArguments(argsIn, args);
30 std::vector<std::string>::iterator s = args.begin();
32 std::string exename = *s;
34 ++s;
35 bool use_win32 = false;
37 if (*s == "WIN32")
39 ++s;
40 use_win32 = true;
43 std::vector<std::string> srclists(s, args.end());
44 m_Makefile->AddExecutable(exename.c_str(), srclists, use_win32);
46 return true;