Commit f1984eeb authored by Alexander David Hellwig's avatar Alexander David Hellwig

Merge branch '20-prepare-templates-for-integration' into 'master'

Prepare Templates for Integration

See merge request !4
parents 7466103a 4d4a1a40
Pipeline #166354 passed with stage
in 38 seconds
......@@ -5,7 +5,7 @@ stages:
BranchJobDeploy:
stage: deploy
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2mqtt
image: registry.git.rwth-aachen.de/monticore/embeddedmontiarc/generators/emam2someip
script:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean deploy --settings settings.xml
- cat target/site/jacoco/index.html
......
......@@ -15,8 +15,19 @@ include_directories (
)
# Linking libraries to target
add_library(SomeIPAdapter_tests_a_compA SomeIPAdapter_tests_a_compA.cpp)
target_link_libraries(SomeIPAdapter_tests_a_compA vsomeip ${Boost_LIBRARIES})
add_library(SomeIPAdapter_tests_a_compA SomeIPAdapter_tests_a_compA.cpp
SomeIPAdapter_tests_a_compA.cpp
SomeIPAdapter_tests_a_compA.h
tests_a_compA.cpp
tests_a_compA.h
)
list(APPEND LIBRARIES tests_a_compA)
#list(APPEND LIBRARIES IAdapter_tests_a_compA)
target_link_libraries(SomeIPAdapter_tests_a_compA vsomeip ${Boost_LIBRARIES} ${LIBRARIES})
target_include_directories(SomeIPAdapter_tests_a_compA PUBLIC ${INCLUDE_DIRS})
# Export target to a cmake module file for outside usage
export(TARGETS SomeIPAdapter_tests_a_compA FILE SomeIPAdapter_tests_a_compA.cmake)
#include <stdio.h>
#include "tests_a_compA.h"
testComp::tests_a_compA(double out1_value, double out2_value)
tests_a_compA::tests_a_compA(double out1_value, double out2_value)
{
out1 = out1_value;
out2 = out2_value;
......
......@@ -8,7 +8,7 @@ using namespace std;
class tests_a_compA {
public:
tests_a_compA(double value);
tests_a_compA(double out1_value, double out2_value);
double in1 = 1.5;
double in2 = 2.5;
double out1 = 0.1;
......
<#import "SomeIPMacros.ftl" as m>
#include "<@m.mwIdent/>Adapter_${model.getEscapedCompName()}.h"
<@m.mwIdent/>Adapter_${model.getEscapedCompName()}::<@m.mwIdent/>Adapter_${model.getEscapedCompName()}() {
<@m.mwIdent/>Adapter_${model.getEscapedCompName()}::<@m.mwIdent/>Adapter_${model.getEscapedCompName()}() : public IAdapter_${model.getEscapedCompName()} {
//choose random ids
in1_service_id = 11;
in1_instance_id = 12;
......
<#import "SomeIPMacros.ftl" as m>
#pragma once
#include "${model.getEscapedCompName()}.h"
#include "IAdapter_${model.getEscapedCompName()}.h"
#include <iomanip>
#include <iostream>
#include <sstream>
......@@ -12,7 +14,7 @@
using namespace std;
class <@m.mwIdent/>Adapter_${model.getEscapedCompName()} {
class <@m.mwIdent/>Adapter_${model.getEscapedCompName()} : public IAdapter_${model.getEscapedCompName()} {
public:
......
......@@ -16,8 +16,19 @@ include_directories (
)
# Linking libraries to target
add_library(SomeIPAdapter_${model.getEscapedCompName()} SomeIPAdapter_${model.getEscapedCompName()}.cpp)
target_link_libraries(SomeIPAdapter_${model.getEscapedCompName()} vsomeip <#noparse>${Boost_LIBRARIES}</#noparse>)
add_library(SomeIPAdapter_${model.getEscapedCompName()} SomeIPAdapter_${model.getEscapedCompName()}.cpp
SomeIPAdapter_${model.getEscapedCompName()}.cpp
SomeIPAdapter_${model.getEscapedCompName()}.h
${model.getEscapedCompName()}.cpp
${model.getEscapedCompName()}.h
)
list(APPEND LIBRARIES ${model.getEscapedCompName()})
list(APPEND LIBRARIES IAdapter_${model.getEscapedCompName()})
target_link_libraries(SomeIPAdapter_${model.getEscapedCompName()} vsomeip <#noparse>${Boost_LIBRARIES}</#noparse> <#noparse>${LIBRARIES}</#noparse>)
target_include_directories(SomeIPAdapter_${model.getEscapedCompName()} PUBLIC <#noparse>${INCLUDE_DIRS}</#noparse>)
# Export target to a cmake module file for outside usage
export(TARGETS SomeIPAdapter_${model.getEscapedCompName()} FILE SomeIPAdapter_${model.getEscapedCompName()}.cmake)
......@@ -15,8 +15,19 @@ include_directories (
)
# Linking libraries to target
add_library(SomeIPAdapter_tests_a_compA SomeIPAdapter_tests_a_compA.cpp)
target_link_libraries(SomeIPAdapter_tests_a_compA vsomeip ${Boost_LIBRARIES})
add_library(SomeIPAdapter_tests_a_compA SomeIPAdapter_tests_a_compA.cpp
SomeIPAdapter_tests_a_compA.cpp
SomeIPAdapter_tests_a_compA.h
tests_a_compA.cpp
tests_a_compA.h
)
list(APPEND LIBRARIES tests_a_compA)
list(APPEND LIBRARIES IAdapter_tests_a_compA)
target_link_libraries(SomeIPAdapter_tests_a_compA vsomeip ${Boost_LIBRARIES} ${LIBRARIES})
target_include_directories(SomeIPAdapter_tests_a_compA PUBLIC ${INCLUDE_DIRS})
# Export target to a cmake module file for outside usage
export(TARGETS SomeIPAdapter_tests_a_compA FILE SomeIPAdapter_tests_a_compA.cmake)
#include "SomeIPAdapter_tests_a_compA.h"
SomeIPAdapter_tests_a_compA::SomeIPAdapter_tests_a_compA() {
SomeIPAdapter_tests_a_compA::SomeIPAdapter_tests_a_compA() : public IAdapter_tests_a_compA {
//choose random ids
in1_service_id = 11;
in1_instance_id = 12;
......
#pragma once
#include "tests_a_compA.h"
#include "IAdapter_tests_a_compA.h"
#include <iomanip>
#include <iostream>
#include <sstream>
......@@ -11,7 +12,7 @@
using namespace std;
class SomeIPAdapter_tests_a_compA {
class SomeIPAdapter_tests_a_compA : public IAdapter_tests_a_compA {
public:
......
......@@ -15,8 +15,19 @@ include_directories (
)
# Linking libraries to target
add_library(SomeIPAdapter_tests_a_compA SomeIPAdapter_tests_a_compA.cpp)
target_link_libraries(SomeIPAdapter_tests_a_compA vsomeip ${Boost_LIBRARIES})
add_library(SomeIPAdapter_tests_a_compA SomeIPAdapter_tests_a_compA.cpp
SomeIPAdapter_tests_a_compA.cpp
SomeIPAdapter_tests_a_compA.h
tests_a_compA.cpp
tests_a_compA.h
)
list(APPEND LIBRARIES tests_a_compA)
list(APPEND LIBRARIES IAdapter_tests_a_compA)
target_link_libraries(SomeIPAdapter_tests_a_compA vsomeip ${Boost_LIBRARIES} ${LIBRARIES})
target_include_directories(SomeIPAdapter_tests_a_compA PUBLIC ${INCLUDE_DIRS})
# Export target to a cmake module file for outside usage
export(TARGETS SomeIPAdapter_tests_a_compA FILE SomeIPAdapter_tests_a_compA.cmake)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment