forked from OpenDDS/OpenDDS
-
Notifications
You must be signed in to change notification settings - Fork 0
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 OpenDDS#4355 from tmayoff/optional
Add warning for @optional annotation
- Loading branch information
Showing
8 changed files
with
95 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
optional_annotation | ||
optionalC.cpp | ||
optionalC.h | ||
optionalC.inl | ||
optionalS.cpp | ||
optionalS.h | ||
optionalTypeSupport.idl | ||
optionalTypeSupportC.cpp | ||
optionalTypeSupportC.h | ||
optionalTypeSupportC.inl | ||
optionalTypeSupportImpl.cpp | ||
optionalTypeSupportImpl.h | ||
optionalTypeSupportS.cpp | ||
optionalTypeSupportS.h |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
cmake_minimum_required(VERSION 3.8...3.27) | ||
project(opendds_compiler_optional CXX) | ||
enable_testing() | ||
|
||
find_package(OpenDDS REQUIRED) | ||
include(opendds_testing) | ||
|
||
add_executable(${PROJECT_NAME} "main.cpp") | ||
set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME optional_annotation) | ||
opendds_target_sources(${PROJECT_NAME} PUBLIC "optional.idl" OPENDDS_IDL_OPTIONS "-Lc++11") | ||
target_link_libraries(${PROJECT_NAME} OpenDDS::Dcps) | ||
|
||
configure_file(run_test.pl . COPYONLY) | ||
opendds_add_test(COMMAND perl run_test.pl) |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "optionalTypeSupportImpl.h" | ||
|
||
#include <dds/DCPS/Serializer.h> | ||
#include <dds/DCPS/TypeSupportImpl.h> | ||
#include <dds/DCPS/FilterEvaluator.h> | ||
|
||
#include <ace/ACE.h> | ||
#include <ace/Log_Msg.h> | ||
|
||
#include <cstdlib> | ||
|
||
|
||
int ACE_TMAIN(int, ACE_TCHAR**) | ||
{ | ||
return EXIT_SUCCESS; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module optional { | ||
|
||
@topic | ||
struct OptionalMembers { | ||
@optional long value; | ||
}; | ||
|
||
}; |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
project(*): dcps_test, msvc_bigobj { | ||
exename = optional_annotation | ||
exeout = . | ||
|
||
Source_Files { | ||
main.cpp | ||
} | ||
|
||
TypeSupport_Files { | ||
optional.idl | ||
} | ||
|
||
IDL_Files { | ||
optional.idl | ||
optionalTypeSupport.idl | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' | ||
& eval 'exec perl -S $0 $argv:q' | ||
if 0; | ||
|
||
use Env (DDS_ROOT); | ||
use lib "$DDS_ROOT/bin"; | ||
use Env (ACE_ROOT); | ||
use lib "$ACE_ROOT/bin"; | ||
use PerlDDS::Run_Test; | ||
use strict; | ||
|
||
my $name = 'optional_annotation'; | ||
|
||
my $test = new PerlDDS::TestFramework(); | ||
|
||
$test->process($name, $name); | ||
$test->start_process($name); | ||
|
||
exit $test->finish(30); |