PhoenixGenerator  2.0.0
Set of tools to generate code
PCMakeListsGenerator.cpp
Go to the documentation of this file.
1 /***************************************
2  Auteur : Pierre Aubert
3  Mail : pierre.aubert@lapp.in2p3.fr
4  Licence : CeCILL-C
5 ****************************************/
6 
7 #include "PCMakeListsGenerator.h"
8 
12 }
13 
15 
18  copyPCMakeLibrary(other);
19 }
20 
23 
24 }
25 
27 
31  copyPCMakeLibrary(other);
32  return *this;
33 }
34 
36 
38 void PCMakeLibrary::setName(const PString & name){
39  p_name = name;
40 }
41 
43 
45 void PCMakeLibrary::setInstallDirectory(const PPath & installDirectory){
46  p_installDirectory = installDirectory;
47 }
48 
50 
52 void PCMakeLibrary::setListLibDependecies(const PVecString & listLibDependecies){
53  p_listLibDependecies = listLibDependecies;
54 }
55 
57 
59 void PCMakeLibrary::setListSources(const PVecPath & listSources){
60  p_listSources = listSources;
61 }
62 
64 
66 void PCMakeLibrary::setListHeaders(const PVecPath & listHeaders){
67  p_listHeaders = listHeaders;
68 }
69 
71 
73 void PCMakeLibrary::setRemoveDefinitions(const PString & removeDefinitions){
74  p_removeDefinitions = removeDefinitions;
75 }
76 
78 
80 void PCMakeLibrary::setAddDefinitions(const PString & addDefinitions){
81  p_addDefinitions = addDefinitions;
82 }
83 
85 
87 void PCMakeLibrary::setOtherCommandAfter(const PString & otherCommandAfter){
88  p_otherCommandAfter = otherCommandAfter;
89 }
90 
92 
94 void PCMakeLibrary::setIsShared(bool isShared){
95  p_isShared = isShared;
96 }
97 
99 
101 void PCMakeLibrary::setWantGenerateFindPackage(bool wantGenerateFindPackage){
102  p_wantGenerateFindPackage = wantGenerateFindPackage;
103 }
104 
106 
109  return p_name;
110 }
111 
113 
116  return p_name;
117 }
118 
120 
123  return p_installDirectory;
124 }
125 
127 
130  return p_installDirectory;
131 }
132 
134 
137  return p_listLibDependecies;
138 }
139 
141 
144  return p_listLibDependecies;
145 }
146 
148 
151  return p_listSources;
152 }
153 
155 
158  return p_listSources;
159 }
160 
162 
165  return p_listHeaders;
166 }
167 
169 
172  return p_listHeaders;
173 }
174 
176 
179  return p_removeDefinitions;
180 }
181 
183 
186  return p_removeDefinitions;
187 }
188 
190 
193  return p_addDefinitions;
194 }
195 
197 
200  return p_addDefinitions;
201 }
202 
204 
207  return p_otherCommandAfter;
208 }
209 
211 
214  return p_otherCommandAfter;
215 }
216 
218 
221  return p_isShared;
222 }
223 
225 
228  return p_isShared;
229 }
230 
232 
236 }
237 
239 
243 }
244 
246 
249  p_name = other.p_name;
257  p_isShared = other.p_isShared;
259 }
260 
263  p_isShared = false;
265 }
266 
270 }
271 
273 
276  copyPCMakeExecutable(other);
277 }
278 
281 
282 }
283 
285 
289  copyPCMakeExecutable(other);
290  return *this;
291 }
292 
294 
297  p_name = name;
298 }
299 
301 
303 void PCMakeExecutable::setInstallDirectory(const PPath & installDirectory){
304  p_installDirectory = installDirectory;
305 }
306 
308 
310 void PCMakeExecutable::setListDependecies(const PVecString & listDependecies){
311  p_listDependecies = listDependecies;
312 }
313 
315 
317 void PCMakeExecutable::setListSources(const PVecPath & listSources){
318  p_listSources = listSources;
319 }
320 
322 
324 void PCMakeExecutable::setRemoveDefinitions(const PString & removeDefinitions){
325  p_removeDefinitions = removeDefinitions;
326 }
327 
329 
331 void PCMakeExecutable::setAddDefinitions(const PString & addDefinitions){
332  p_addDefinitions = addDefinitions;
333 }
334 
336 
338 void PCMakeExecutable::setOtherCommandAfter(const PString & otherCommandAfter){
339  p_otherCommandAfter = otherCommandAfter;
340 }
341 
343 
345 void PCMakeExecutable::setWantGenerateFindPackage(bool wantGenerateFindPackage){
346  p_wantGenerateFindPackage = wantGenerateFindPackage;
347 }
348 
350 
353  return p_name;
354 }
355 
357 
360  return p_name;
361 }
362 
364 
367  return p_installDirectory;
368 }
369 
371 
374  return p_installDirectory;
375 }
376 
378 
381  return p_listDependecies;
382 }
383 
385 
388  return p_listDependecies;
389 }
390 
392 
395  return p_listSources;
396 }
397 
399 
402  return p_listSources;
403 }
404 
406 
409  return p_removeDefinitions;
410 }
411 
413 
416  return p_removeDefinitions;
417 }
418 
420 
423  return p_addDefinitions;
424 }
425 
427 
430  return p_addDefinitions;
431 }
432 
434 
437  return p_otherCommandAfter;
438 }
439 
441 
444  return p_otherCommandAfter;
445 }
446 
448 
452 }
453 
455 
459 }
460 
462 
465  p_name = other.p_name;
473 }
474 
478 }
479 
483 }
484 
486 
490 }
491 
494 
495 }
496 
498 
503  return *this;
504 }
505 
507 
510  p_projectName = projectName;
511 }
512 
514 
516 void PCMakeListsGenerator::setCmakeModulePath(const PPath & cmakeModulePath){
517  p_cmakeModulePath = cmakeModulePath;
518 }
519 
521 
524  p_listPackage = listPackage;
525 }
526 
528 
530 void PCMakeListsGenerator::setListIncludeDirectories(const PVecPath & listIncludeDirectories){
531  p_listIncludeDirectories = listIncludeDirectories;
532 }
533 
535 
537 void PCMakeListsGenerator::setListLinkDirecories(const PVecPath & listLinkDirecories){
538  p_listLinkDirecories = listLinkDirecories;
539 }
540 
542 
544 void PCMakeListsGenerator::setListLibraries(const std::vector<PCMakeLibrary> & listLibraries){
545  p_listLibraries = listLibraries;
546 }
547 
549 
551 void PCMakeListsGenerator::setListExecutable(const std::vector<PCMakeExecutable> & listExecutable){
552  p_listExecutable = listExecutable;
553 }
554 
556 
558 void PCMakeListsGenerator::setTestDirectory(const PPath & testDirectory){
559  p_testDirectory = testDirectory;
560 }
561 
563 
566  return p_projectName;
567 }
568 
570 
573  return p_projectName;
574 }
575 
577 
580  return p_cmakeModulePath;
581 }
582 
584 
587  return p_cmakeModulePath;
588 }
589 
591 
594  return p_listPackage;
595 }
596 
598 
601  return p_listPackage;
602 }
603 
605 
609 }
610 
612 
616 }
617 
619 
622  return p_listLinkDirecories;
623 }
624 
626 
629  return p_listLinkDirecories;
630 }
631 
633 
635 const std::vector<PCMakeLibrary> & PCMakeListsGenerator::getListLibraries() const{
636  return p_listLibraries;
637 }
638 
640 
642 std::vector<PCMakeLibrary> & PCMakeListsGenerator::getListLibraries(){
643  return p_listLibraries;
644 }
645 
647 
649 const std::vector<PCMakeExecutable> & PCMakeListsGenerator::getListExecutable() const{
650  return p_listExecutable;
651 }
652 
654 
656 std::vector<PCMakeExecutable> & PCMakeListsGenerator::getListExecutable(){
657  return p_listExecutable;
658 }
659 
661 
664  return p_testDirectory;
665 }
666 
668 
671  return p_testDirectory;
672 }
673 
675 
686 }
687 
690 
691 }
692 
std::vector< PPath > PVecPath
Definition: PPath.h:75
std::vector< PString > PVecString
Definition: PString.h:96
Describes a CMake executable.
void setListSources(const PVecPath &listSources)
Sets the listSources of the PCMakeExecutable.
virtual ~PCMakeExecutable()
Destructor of class PCMakeExecutable.
void setName(const PString &name)
Sets the name of the PCMakeExecutable.
const PString & getName() const
Gets the name of the PCMakeExecutable.
void setOtherCommandAfter(const PString &otherCommandAfter)
Sets the otherCommandAfter of the PCMakeExecutable.
bool getWantGenerateFindPackage() const
Gets the wantGenerateFindPackage of the PCMakeExecutable.
PString p_addDefinitions
String to pass to the add_definitions.
PString p_removeDefinitions
String to pass to the remove_definitions.
void copyPCMakeExecutable(const PCMakeExecutable &other)
Copy Function of class PCMakeExecutable.
void setAddDefinitions(const PString &addDefinitions)
Sets the addDefinitions of the PCMakeExecutable.
const PVecString & getListDependecies() const
Gets the listDependecies of the PCMakeExecutable.
PVecString p_listDependecies
List of the executable libraries dependencies.
const PPath & getInstallDirectory() const
Gets the installDirectory of the PCMakeExecutable.
void setInstallDirectory(const PPath &installDirectory)
Sets the installDirectory of the PCMakeExecutable.
void initialisationPCMakeExecutable()
Initialisation Function of class PCMakeExecutable.
const PString & getOtherCommandAfter() const
Gets the otherCommandAfter of the PCMakeExecutable.
const PString & getRemoveDefinitions() const
Gets the removeDefinitions of the PCMakeExecutable.
PPath p_installDirectory
Name of the install directory of the executable.
void setWantGenerateFindPackage(bool wantGenerateFindPackage)
Sets the wantGenerateFindPackage of the PCMakeExecutable.
PCMakeExecutable()
Constructor of class PCMakeExecutable.
PCMakeExecutable & operator=(const PCMakeExecutable &other)
Operator = of class PCMakeExecutable.
const PString & getAddDefinitions() const
Gets the addDefinitions of the PCMakeExecutable.
PVecPath p_listSources
Lists of the sources.
void setRemoveDefinitions(const PString &removeDefinitions)
Sets the removeDefinitions of the PCMakeExecutable.
PString p_otherCommandAfter
Other command after the definition of the target.
const PVecPath & getListSources() const
Gets the listSources of the PCMakeExecutable.
void setListDependecies(const PVecString &listDependecies)
Sets the listDependecies of the PCMakeExecutable.
PString p_name
Name of the executable.
bool p_wantGenerateFindPackage
True if we want to have the CMake find_package file generated for the given executable.
Describes a CMake library.
const PPath & getInstallDirectory() const
Gets the installDirectory of the PCMakeLibrary.
const PVecString & getListLibDependecies() const
Gets the listLibDependecies of the PCMakeLibrary.
const PVecPath & getListHeaders() const
Gets the listHeaders of the PCMakeLibrary.
void setWantGenerateFindPackage(bool wantGenerateFindPackage)
Sets the wantGenerateFindPackage of the PCMakeLibrary.
void setInstallDirectory(const PPath &installDirectory)
Sets the installDirectory of the PCMakeLibrary.
bool p_isShared
True if the library is chared false if not.
void setListHeaders(const PVecPath &listHeaders)
Sets the listHeaders of the PCMakeLibrary.
const PVecPath & getListSources() const
Gets the listSources of the PCMakeLibrary.
PCMakeLibrary()
Constructor of class PCMakeLibrary.
void setName(const PString &name)
Sets the name of the PCMakeLibrary.
void setRemoveDefinitions(const PString &removeDefinitions)
Sets the removeDefinitions of the PCMakeLibrary.
bool p_wantGenerateFindPackage
True if we want to have the CMake find_package file generated for the given lib.
PCMakeLibrary & operator=(const PCMakeLibrary &other)
Operator = of class PCMakeLibrary.
const PString & getName() const
Gets the name of the PCMakeLibrary.
void setIsShared(bool isShared)
Sets the isShared of the PCMakeLibrary.
const PString & getRemoveDefinitions() const
Gets the removeDefinitions of the PCMakeLibrary.
bool getWantGenerateFindPackage() const
Gets the wantGenerateFindPackage of the PCMakeLibrary.
PVecPath p_listSources
Lists of the sources.
PString p_otherCommandAfter
Other command after the definition of the target.
PVecPath p_listHeaders
Lists of the headers.
PString p_name
Name of the library.
bool getIsShared() const
Gets the isShared of the PCMakeLibrary.
PVecString p_listLibDependecies
List of the library libraries dependencies.
const PString & getOtherCommandAfter() const
Gets the otherCommandAfter of the PCMakeLibrary.
void setListLibDependecies(const PVecString &listLibDependecies)
Sets the listLibDependecies of the PCMakeLibrary.
PPath p_installDirectory
Name of the install directory of the library.
void initialisationPCMakeLibrary()
Initialisation Function of class PCMakeLibrary.
virtual ~PCMakeLibrary()
Destructor of class PCMakeLibrary.
void setOtherCommandAfter(const PString &otherCommandAfter)
Sets the otherCommandAfter of the PCMakeLibrary.
void copyPCMakeLibrary(const PCMakeLibrary &other)
Copy Function of class PCMakeLibrary.
void setAddDefinitions(const PString &addDefinitions)
Sets the addDefinitions of the PCMakeLibrary.
const PString & getAddDefinitions() const
Gets the addDefinitions of the PCMakeLibrary.
void setListSources(const PVecPath &listSources)
Sets the listSources of the PCMakeLibrary.
PString p_removeDefinitions
String to pass to the remove_definitions.
PString p_addDefinitions
String to pass to the add_definitions.
Describes a CMakeLists.txt file.
const PPath & getCmakeModulePath() const
Gets the cmakeModulePath of the PCMakeListsGenerator.
PVecPath p_listLinkDirecories
Lists of the link directories.
const PVecPath & getListIncludeDirectories() const
Gets the listIncludeDirectories of the PCMakeListsGenerator.
void setListPackage(const PVecString &listPackage)
Sets the listPackage of the PCMakeListsGenerator.
const PVecPath & getListLinkDirecories() const
Gets the listLinkDirecories of the PCMakeListsGenerator.
void setListLibraries(const std::vector< PCMakeLibrary > &listLibraries)
Sets the listLibraries of the PCMakeListsGenerator.
void setListLinkDirecories(const PVecPath &listLinkDirecories)
Sets the listLinkDirecories of the PCMakeListsGenerator.
void setTestDirectory(const PPath &testDirectory)
Sets the testDirectory of the PCMakeListsGenerator.
const PPath & getTestDirectory() const
Gets the testDirectory of the PCMakeListsGenerator.
PVecString p_listPackage
List of the packages dependencies.
void initialisationPCMakeListsGenerator()
Initialisation Function of class PCMakeListsGenerator.
const std::vector< PCMakeExecutable > & getListExecutable() const
Gets the listExecutable of the PCMakeListsGenerator.
std::vector< PCMakeExecutable > p_listExecutable
List of the executable.
PString p_projectName
Name of the project.
const PVecString & getListPackage() const
Gets the listPackage of the PCMakeListsGenerator.
void setListExecutable(const std::vector< PCMakeExecutable > &listExecutable)
Sets the listExecutable of the PCMakeListsGenerator.
void setListIncludeDirectories(const PVecPath &listIncludeDirectories)
Sets the listIncludeDirectories of the PCMakeListsGenerator.
PCMakeListsGenerator & operator=(const PCMakeListsGenerator &other)
Operator = of class PCMakeListsGenerator.
PVecPath p_listIncludeDirectories
Lists of the include directories.
void copyPCMakeListsGenerator(const PCMakeListsGenerator &other)
Copy Function of class PCMakeListsGenerator.
void setProjectName(const PString &projectName)
Sets the projectName of the PCMakeListsGenerator.
void setCmakeModulePath(const PPath &cmakeModulePath)
Sets the cmakeModulePath of the PCMakeListsGenerator.
PPath p_testDirectory
Test sub-directory.
std::vector< PCMakeLibrary > p_listLibraries
List of the libraries.
const PString & getProjectName() const
Gets the projectName of the PCMakeListsGenerator.
PPath p_cmakeModulePath
CMAKE_MODULE_PATH variable.
virtual ~PCMakeListsGenerator()
Destructor of class PCMakeListsGenerator.
PCMakeListsGenerator()
Constructor of class PCMakeListsGenerator.
const std::vector< PCMakeLibrary > & getListLibraries() const
Gets the listLibraries of the PCMakeListsGenerator.
Path of a directory or a file.
Definition: PPath.h:17
Extends the std::string.
Definition: PString.h:16