new arch
[cmake.git] / Source / cmakemain.cxx
blobab72912fdac385204c9256bf5b5966a5d858622f
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmakemain.cxx,v $
5 Language: C++
6 Date: $Date: 2002-09-06 17:04:25 $
7 Version: $Revision: 1.10 $
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 "cmakewizard.h"
18 #include "cmake.h"
19 #include "cmMakefileGenerator.h"
20 #include "cmCacheManager.h"
22 int main(int ac, char** av)
24 bool wiz = false;
25 bool command = false;
26 std::vector<std::string> args;
27 for(int i =0; i < ac; ++i)
29 if(strcmp(av[i], "-i") == 0)
31 wiz = true;
33 else
35 if (strcmp(av[i], "-E") == 0)
37 command = true;
39 else
41 args.push_back(av[i]);
46 if(command)
48 int ret = cmake::CMakeCommand(args);
49 return ret;
51 if (wiz)
53 cmakewizard wizard;
54 wizard.RunWizard(args);
55 return 0;
57 cmake cm;
58 int ret = cm.Run(args);
59 return ret;