cmakemain.cxx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #include "cmakewizard.h"
  14. #include "cmake.h"
  15. #include "cmMakefileGenerator.h"
  16. int main(int ac, char** av)
  17. {
  18. bool wiz = false;
  19. std::vector<std::string> args;
  20. for(int i =0; i < ac; ++i)
  21. {
  22. if(strcmp(av[i], "-i") == 0)
  23. {
  24. wiz = true;
  25. }
  26. else
  27. {
  28. args.push_back(av[i]);
  29. }
  30. }
  31. if(!wiz)
  32. {
  33. cmake cm;
  34. int ret = cm.Generate(args);
  35. cmMakefileGenerator::UnRegisterGenerators();
  36. return ret;
  37. }
  38. cmakewizard wizard;
  39. wizard.RunWizard(args);
  40. cmMakefileGenerator::UnRegisterGenerators();
  41. return 0;
  42. }