Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmGlobalKdevelopGenerator.h
blob380f24ff1e12555774069089a4711aab9be221c6
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmGlobalKdevelopGenerator.h,v $
5 Language: C++
6 <<<<<<< cmGlobalKdevelopGenerator.h
7 Date: $Date: 2007/08/26 23:27:33 $
8 Version: $Revision: 1.7 $
9 =======
10 Date: $Date: 2008-03-27 21:40:43 $
11 Version: $Revision: 1.8 $
12 >>>>>>> 1.8
14 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
15 Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved.
16 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
18 This software is distributed WITHOUT ANY WARRANTY; without even
19 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20 PURPOSE. See the above copyright notices for more information.
22 =========================================================================*/
23 #ifndef cmGlobalKdevelopGenerator_h
24 #define cmGlobalKdevelopGenerator_h
26 #include "cmExternalMakefileProjectGenerator.h"
28 class cmLocalGenerator;
30 /** \class cmGlobalKdevelopGenerator
31 * \brief Write Unix Makefiles accompanied by KDevelop3 project files.
33 * cmGlobalKdevelopGenerator produces a project file for KDevelop 3 (KDevelop
34 * > 3.1.1). The project is based on the "Custom Makefile based C/C++"
35 * project of KDevelop. Such a project consists of Unix Makefiles in the
36 * build directory together with a <your_project>.kdevelop project file,
37 * which contains the project settings and a <your_project>.kdevelop.filelist
38 * file, which lists the source files relative to the kdevelop project
39 * directory. The kdevelop project directory is the base source directory.
41 class cmGlobalKdevelopGenerator : public cmExternalMakefileProjectGenerator
43 public:
44 cmGlobalKdevelopGenerator();
46 virtual const char* GetName() const
47 { return cmGlobalKdevelopGenerator::GetActualName();}
48 static const char* GetActualName() { return "KDevelop3";}
49 static cmExternalMakefileProjectGenerator* New()
50 { return new cmGlobalKdevelopGenerator; }
51 /** Get the documentation entry for this generator. */
52 virtual void GetDocumentation(cmDocumentationEntry& entry,
53 const char* fullName) const;
55 virtual void Generate();
56 private:
57 /*** Create the foo.kdevelop.filelist file, return false if it doesn't
58 succeed. If the file already exists the contents will be merged.
60 bool CreateFilelistFile(const std::vector<cmLocalGenerator*>& lgs,
61 const std::string& outputDir,
62 const std::string& projectDirIn,
63 const std::string& projectname,
64 std::string& cmakeFilePattern,
65 std::string& fileToOpen);
67 /** Create the foo.kdevelop file. This one calls MergeProjectFiles()
68 if it already exists, otherwise createNewProjectFile() The project
69 files will be created in \a outputDir (in the build tree), the
70 kdevelop project dir will be set to \a projectDir (in the source
71 tree). \a cmakeFilePattern consists of a lists of all cmake
72 listfiles used by this CMakeLists.txt */
73 void CreateProjectFile(const std::string& outputDir,
74 const std::string& projectDir,
75 const std::string& projectname,
76 const std::string& executable,
77 const std::string& cmakeFilePattern,
78 const std::string& fileToOpen);
80 /*** Reads the old foo.kdevelop line by line and only replaces the
81 "important" lines
83 void MergeProjectFiles(const std::string& outputDir,
84 const std::string& projectDir,
85 const std::string& filename,
86 const std::string& executable,
87 const std::string& cmakeFilePattern,
88 const std::string& fileToOpen,
89 const std::string& sessionFilename);
90 ///! Creates a new foo.kdevelop and a new foo.kdevses file
91 void CreateNewProjectFile(const std::string& outputDir,
92 const std::string& projectDir,
93 const std::string& filename,
94 const std::string& executable,
95 const std::string& cmakeFilePattern,
96 const std::string& fileToOpen,
97 const std::string& sessionFilename);
99 std::vector<std::string> Blacklist;
102 #endif