cmLocalKdevelopGenerator.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. Copyright (c) 2004 Alexander Neundorf, [email protected]. All rights reserved.
  9. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  10. This software is distributed WITHOUT ANY WARRANTY; without even
  11. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  12. PURPOSE. See the above copyright notices for more information.
  13. =========================================================================*/
  14. #ifndef cmLocalKdevelopGenerator_h
  15. #define cmLocalKdevelopGenerator_h
  16. #include "cmLocalUnixMakefileGenerator.h"
  17. class cmDependInformation;
  18. class cmMakeDepend;
  19. class cmTarget;
  20. class cmSourceFile;
  21. /** \class cmLocalKdevelopGenerator
  22. * \brief Write a LocalUnix makefiles.
  23. *
  24. * cmLocalKdevelopGenerator produces a LocalUnix makefile from its
  25. * member m_Makefile.
  26. */
  27. class cmLocalKdevelopGenerator : public cmLocalUnixMakefileGenerator
  28. {
  29. public:
  30. ///! Set cache only and recurse to false by default.
  31. cmLocalKdevelopGenerator();
  32. virtual ~cmLocalKdevelopGenerator();
  33. /**
  34. * Generate the makefile for this directory. fromTheTop indicates if this
  35. * is being invoked as part of a global Generate or specific to this
  36. * directory. The difference is that when done from the Top we might skip
  37. * some steps to save time, such as dependency generation for the
  38. * makefiles. This is done by a direct invocation from make.
  39. */
  40. virtual void Generate(bool fromTheTop);
  41. protected:
  42. /**
  43. Create the foo.kdevelop file. This one calls MergeProjectFiles()
  44. if it already exists, otherwise createNewProjectFile()
  45. */
  46. void CreateProjectFile(const std::string& outputDir, const std::string& projectDir,
  47. const std::string& projectname, const std::string& executable,
  48. const std::string& cmakeFilePattern);
  49. ///! Create the foo.kdevelop.filelist file, return false if it doesn't succeed
  50. bool CreateFilelistFile(const std::string& outputDir, const std::string& projectDir,
  51. const std::string& projectname, std::string& cmakeFilePattern);
  52. ///! Reads the old foo.kdevelop line by line and only replaces the "important" lines
  53. void MergeProjectFiles(const std::string& outputDir, const std::string& projectDir,
  54. const std::string& filename, const std::string& executable,
  55. const std::string& cmakeFilePattern);
  56. ///! Creates a new foo.kdevelop file
  57. void CreateNewProjectFile(const std::string& outputDir, const std::string& projectDir,
  58. const std::string& filename, const std::string& executable,
  59. const std::string& cmakeFilePattern);
  60. };
  61. #endif