-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CCpp target #513
CCpp target #513
Changes from 27 commits
44e2b67
3b54e97
c81cf3b
334e33c
8e08f12
7a96461
ed2084a
c98cb61
60d2970
53e4d86
8e3729d
6e87733
5092f6e
7ff8cf0
5c3f9ba
e20e3b1
4a07316
da58de2
f368af6
0e13698
1bad76c
ea1beda
5810393
4017149
efb606c
bae6c05
036ab9f
499e372
70aed12
20ce46b
5bc3fc8
25335d4
9f7459f
27b91c3
babc7b0
aba6182
afe522f
5d416e3
23ac2fa
402dac4
8892e1f
233019c
c6c908e
bdcbaa7
e38dac0
315a904
3ad0f5f
e9ff67c
7b845b6
f871e0f
f75531b
a0bdd76
bdeaac4
e27ce41
c8efedd
b54bf70
a7756ad
21a68aa
a18b559
b5bd149
818cabe
e8e0586
615d0e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/** | ||
* This example showcases the infrastructure that is built into LF | ||
* C runtime that can automatically serialize and deserialize ROS2 | ||
* This example showcases the infrastructure that is built into the | ||
* CCpp target that can automatically serialize and deserialize ROS2 | ||
* messages in federated programs. | ||
* | ||
* This example contains a sender-receiver federated program in which | ||
|
@@ -21,11 +21,10 @@ | |
* | ||
* @author Soroush Bateni <[email protected]> | ||
*/ | ||
target C { | ||
target CCpp { | ||
cmake: true, // Only CMake is supported | ||
cmake-include: "include/CMakeListsExtension.txt", | ||
threads: 1, | ||
compiler: "g++" | ||
}; | ||
|
||
preamble {= | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,6 +162,16 @@ class ASTUtils { | |
return true | ||
} | ||
|
||
/** | ||
* Change the target name to 'newTargetName'. | ||
* For example, change C to CCpp. | ||
*/ | ||
static def boolean changeTargetName(Resource resource, String newTargetName) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems dangerous. I assume it is needed by the test that compile C tests as CCpp? I wouldn't expose this function here if we don't have a use-case for it. Maybe it would be better placed in the test package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Correct.
I think semantically, it belongs to ASTUtils because it is an AST transformation after all. |
||
val r = resource.targetDecl | ||
r.name = newTargetName | ||
return true | ||
} | ||
|
||
/** | ||
* Return true if any port on the left or right of the connection involves | ||
* a bank of reactors or a multiport. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it this exampke or the CCpp target that only supports cmake? In the latter case, do we need this line and should we even allow the
cmake
property in this target?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the target
CCpp
works without CMake. We have tests for that in this branch.ROS Serialization on the other hand only works with CMake. That's a great point. I will add a check.