1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmGlobalCodeWarriorGenerator.h,v $
6 Date: $Date: 2002-10-09 17:49:56 $
7 Version: $Revision: 1.2 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmGlobalCodeWarriorGenerator_h
18 #define cmGlobalCodeWarriorGenerator_h
20 #include "cmGlobalGenerator.h"
24 /** \class cmGlobalCodeWarriorGenerator
25 * \brief Write a Unix makefiles.
27 * cmGlobalCodeWarriorGenerator manages UNIX build process for a tree
29 class cmGlobalCodeWarriorGenerator
: public cmGlobalGenerator
32 ///! Get the name for the generator.
33 virtual const char* GetName() {
34 return cmGlobalCodeWarriorGenerator::GetActualName();}
35 static const char* GetActualName() {return "Code Warrior Not Working";}
37 ///! Create a local generator appropriate to this Global Generator
38 virtual cmLocalGenerator
*CreateLocalGenerator();
41 * Try to determine system infomation such as shared library
42 * extension, pthreads, byte order etc.
44 virtual void EnableLanguage(const char*, cmMakefile
*mf
);
47 * Try running cmake and building a file. This is used for dynalically
48 * loaded commands, not as part of the usual build process.
50 virtual int TryCompile(const char *srcdir
, const char *bindir
,
51 const char *projectName
, const char *targetName
,
55 * Generate the all required files for building this project/tree. This
56 * basically creates a series of LocalGenerators for each directory and
57 * requests that they Generate.
59 virtual void Generate();
62 * Generate the required files for building this directory. This
63 * basically creates a single LocalGenerators and
64 * requests that it Generate.
66 virtual void LocalGenerate();
69 * Generate the DSW workspace file.
71 virtual void OutputProject();
74 cmTarget
*GetTargetFromName(const char *tgtName
);
75 void WriteProject(std::ostream
& fout
);
76 void WriteProjectHeader(std::ostream
& fout
);
77 void WriteTargetList(std::ostream
& fout
);
78 void WriteTargetOrder(std::ostream
& fout
);
79 void WriteGroupList(std::ostream
& fout
);
80 void ComputeTargetOrder(std::vector
<std::string
> &tgtOrder
,
81 const char *tgtName
, cmTarget
const *tgt
);