-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #513 from lf-lang/ccpp-target
CCpp target
- Loading branch information
Showing
55 changed files
with
985 additions
and
997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {= | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") | ||
target_sources(${LF_MAIN_TARGET} PRIVATE audio_loop_linux.c) | ||
find_package( ALSA REQUIRED) | ||
if (ALSA_FOUND) | ||
include_directories( ${ALSA_INCLUDE_DIRS} ) | ||
target_link_libraries( ${LF_MAIN_TARGET} ${ALSA_LIBRARIES} ) | ||
endif(ALSA_FOUND) | ||
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") | ||
target_sources(${LF_MAIN_TARGET} PRIVATE audio_loop_mac.c) | ||
target_link_libraries( ${LF_MAIN_TARGET} "-framework AudioToolbox" ) | ||
target_link_libraries( ${LF_MAIN_TARGET} "-framework CoreFoundation" ) | ||
else() | ||
message(FATAL_ERROR "Your platform is not supported!" | ||
" The C target supports Linux, MacOS and Windows.") | ||
endif() | ||
" Sound is only currently supported on Linux and MacOS.") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.