Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Ocarina
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
TASTE
Ocarina
Commits
f7b458c3
Commit
f7b458c3
authored
Jul 15, 2013
by
yoogx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Recognize also .cpp as a valid C++ extension
parent
cd210488
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
src/backends/ocarina-backends-build_utils.adb
src/backends/ocarina-backends-build_utils.adb
+13
-10
No files found.
src/backends/ocarina-backends-build_utils.adb
View file @
f7b458c3
...
...
@@ -667,14 +667,14 @@ package body Ocarina.Backends.Build_Utils is
S_Name
:
Name_Id
;
Binding_Key
:
constant
String
:=
"%user_src_dir%"
;
begin
-- Ensure the user gives at most one source file (.cc)
-- Ensure the user gives at most one source file (.cc
or .cpp
)
if
Source_Files
'
Length
>
1
and
then
Get_Current_Backend_Kind
=
PolyORB_HI_Ada
then
Display_Located_Error
(
Loc
(
E
),
"more than one source files for a C subprogram"
,
"more than one source files for a C
++
subprogram"
,
Fatal
=>
True
);
end
if
;
...
...
@@ -732,7 +732,9 @@ package body Ocarina.Backends.Build_Utils is
Get_Name_String
(
Source_Basename
);
if
Name_Buffer
(
Name_Len
-
2
..
Name_Len
)
=
".cc"
then
if
Name_Buffer
(
Name_Len
-
2
..
Name_Len
)
=
".cc"
or
else
Name_Buffer
(
Name_Len
-
3
..
Name_Len
)
=
".cpp"
then
Get_Name_String
(
Source_Dirname
);
Get_Name_String_And_Append
(
Source_Basename
);
...
...
@@ -1204,11 +1206,11 @@ package body Ocarina.Backends.Build_Utils is
Handle_C_Source
(
E
,
Source_Name
,
Source_Files
,
M
);
when
Subprogram_Opaque_CPP
=>
-- If the subprogram is implemented by C
source files,
--
add the files to the C_Files list of the makefil
e
--
structure. If the subprogram is implemented by a C
--
library, add the files to the C_Libraries list of
-- the makefile structure.
-- If the subprogram is implemented by C
PP source
--
files, add the files to the CPP_Files list of th
e
--
makefile structure. If the subprogram is
--
implemented by a CPP library, add the files to the
--
C_Libraries list of
the makefile structure.
Handle_CPP_Source
(
E
,
Source_Name
,
Source_Files
,
M
);
...
...
@@ -1514,7 +1516,6 @@ package body Ocarina.Backends.Build_Utils is
Name_Tables
.
First
..
Name_Tables
.
Last
(
M
.
C_Objs
)
loop
Write_Name
(
M
.
C_Objs
.
Table
(
J
));
exit
when
J
=
Name_Tables
.
Last
(
M
.
C_Objs
);
Write_Line
(
" \"
);
...
...
@@ -1764,7 +1765,7 @@ package body Ocarina.Backends.Build_Utils is
procedure
Ada_C_Command_Line_Flags
(
Ada_Sources
:
Name_Tables
.
Instance
;
C_Sources
:
Name_Tables
.
Instance
;
CPP_Sources
:
Name_Tables
.
Instance
;
CPP_Sources
:
Name_Tables
.
Instance
;
C_Libraries
:
Name_Tables
.
Instance
)
is
begin
if
Length
(
Ada_Sources
)
>
0
...
...
@@ -1807,6 +1808,8 @@ package body Ocarina.Backends.Build_Utils is
end
if
;
if
Length
(
CPP_Sources
)
>
0
then
Write_Line
(
" \"
);
Write_Str
(
ASCII
.
HT
&
" "
);
for
J
in
Name_Tables
.
First
..
Name_Tables
.
Last
(
CPP_Sources
)
loop
Get_Name_String
(
CPP_Sources
.
Table
(
J
));
Set_Str_To_Name_Buffer
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment