cmLocalKdevelopGenerator.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. ///Create the foo.kdevelop file. This one calls MergeProjectFiles() if it already exists, otherwise createNewProjectFile()
  43. void CreateProjectFile(const std::string& dir, const std::string& projectname, const std::string& executable, const std::string& cmakeFilePattern);
  44. /// Create the foo.kdevelop.filelist file, return false if it doesn't succeed
  45. bool CreateFilelistFile(const std::string& dir, const std::string& projectname, std::string& cmakeFilePattern);
  46. ///Reads the old foo.kdevelop line by line and only replaces the "important" lines
  47. void MergeProjectFiles(const std::string& dir, const std::string& filename, const std::string& executable, const std::string& cmakeFilePattern);
  48. ///Creates a new foo.kdevelop file
  49. void CreateNewProjectFile(const std::string& dir, const std::string& filename, const std::string& executable, const std::string& cmakeFilePattern);
  50. };
  51. #endif