1 package CDT6ProjectCreator
;
3 # ************************************************************
4 # Description : Eclipse CDT 6 generator
5 # Author : Chris Cleeland, Object Computing, Inc.
6 # Create Date : 23-Apr-2010
7 # ************************************************************
9 # ************************************************************
11 # ************************************************************
18 @ISA = qw(ProjectCreator);
20 # ************************************************************
22 # ************************************************************
24 my %templates = ('cdt6project' => '.project',
25 'cdt6cproject' => '.cproject' );
27 my @tkeys = sort keys %templates;
29 # ************************************************************
31 # ************************************************************
38 sub project_file_name
{
39 my($self, $name, $template) = @_;
41 ## Fill in the name and template if they weren't provided
42 $name = $self->project_name() if (!defined $name);
43 $template = 'cdt6project' if (!defined $template ||
44 !defined $templates{$template});
46 if ($self->{'make_coexistence'}) {
47 return $self->get_modified_project_file_name("cdt_$name",
48 '/' . $templates{$template});
51 return $templates{$template};
56 my($self, $name) = @_;
58 if ($name eq 'platforms') {
59 if (defined $ENV{'MPC_CDT_PLATFORMS'}) {
60 return $ENV{'MPC_CDT_PLATFORMS'};
62 elsif ($^O
eq 'darwin') {
65 elsif ($^O
eq 'MSWin32') {
69 return $^O
; # cygwin, solaris, linux match what we expect
72 elsif ($name eq 'nocross') {
73 # return the value of the 'nocross' element from the project_info array
74 return $self->get_project_info()->[ProjectCreator
::NO_CROSS_COMPILE
];
77 return $self->get_configurable($name);
80 sub get_configurable
{
81 #my($self, $name) = @_;
90 sub dependency_is_filename
{
95 sub requires_forward_slashes
{
100 ## We only want the project file visible to the workspace creator.
101 ## There can only be one and this is it.
102 #my($self, $template) = @_;
103 return $_[1] eq 'cdt6project';
106 sub get_dll_exe_template_input_file
{
111 sub get_dll_template_input_file
{
113 #print "in get_dll_template_input_file\n";
117 sub get_lib_template_input_file
{
119 #print "in get_lib_template_input_file\n";
123 sub use_win_compatibility_commands
{
124 return (defined $ENV{'MPC_CDT_HOST_WIN32'})
125 ?
$ENV{'MPC_CDT_HOST_WIN32'} : ($^O
eq 'MSWin32' || $^O
eq 'cygwin');
128 sub pre_write_output_file
{
130 if ($self->{'assign'}->{'custom_only'}) {
133 return $self->combine_custom_types();