cmake.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 "cmMakefile.h"
  14. #include "cmStandardIncludes.h"
  15. class cmake
  16. {
  17. public:
  18. /**
  19. * Generate the SourceFilesList from the SourceLists. This should only be
  20. * done once to be safe.
  21. */
  22. void Usage(const char *program);
  23. /**
  24. * Generate the SourceFilesList from the SourceLists. This should only be
  25. * done once to be safe. The argument is a list of command line
  26. * arguments. The first argument should be the name or full path
  27. * to the command line version of cmake. For building a GUI,
  28. * you would pass in the following arguments:
  29. * /path/to/cmake -H/path/to/source -B/path/to/build
  30. * If you only want to parse the CMakeLists.txt files,
  31. * but not actually generate the makefiles, use buildMakefiles = false.
  32. */
  33. int Generate(const std::vector<std::string>&, bool buildMakefiles = true);
  34. /**
  35. * Execute commands during the build process. Supports options such
  36. * as echo, remove file etc.
  37. */
  38. static int CMakeCommand(std::vector<std::string>&);
  39. ///! Parse command line arguments
  40. void SetArgs(cmMakefile& builder, const std::vector<std::string>&);
  41. ///! Parse command line arguments that might set cache values
  42. void SetCacheArgs(cmMakefile& builder, const std::vector<std::string>&);
  43. /**
  44. * Generate CMAKE_ROOT and CMAKE_COMMAND cache entries
  45. */
  46. int AddCMakePaths(const std::vector<std::string>&);
  47. /**
  48. * constructor
  49. */
  50. cmake();
  51. ~cmake();
  52. private:
  53. bool m_Verbose;
  54. bool m_Local;
  55. };