Browse Source

added the cpp framework

Kenneth Lausdahl 7 years ago
parent
commit
b0d4e0d5c7

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib/src/resources/hybridCosimulation-framework"]
+	path = DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib/src/resources/hybridCosimulation-framework
+	url = https://github.com/into-cps/hybridCosimulation-framework.git

+ 20 - 8
DSL_SemanticAdaptation/README.txt

@@ -1,26 +1,38 @@
-Installation Instructions:
+# Checkout
+
+```bash
+git clone <repo-url>
+git submodule update --init --recursive
+```
+
+# Development environmant:
+
+Install instructions:
 - Download Eclipse NEON (64 bits) installer.
 - Run it, and select "Eclipse DSL Tools" environment.
 or if you already have Eclipse NEON then just install the xText plugins
 - repo http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
 -  plugins `Xtend IDE` and `Xtend Complete SDK`
 
-BEFORE MAVEN
+# Compilation
+
+## Using Eclipse
 Generation and Compilation
 - Import all projects in this folder.
 - Right click in be.uantwerpen.ansymo.semanticadaptation/src/be/uantwerpen/ansymo/semanticadaptation/SemanticAdaptation.xtext   and select "run as -> generate xtext artifacts"
 - Check that the console log is similar to the one in File "first_generation_sucessful_log.txt".
-AFTER MAVEN
+
+## Using Maven
 - In CONSOLE run "mvn package" in DSL_SemanticAdaptation
 - In eclipse choose import -> Maven -> Existing Maven Projects and choose the LEAF nodes
 - Might be necessary to right click on a project -> Maven -> Update project
 
-Building maven:
-mvn package
-Cleaning maven:
-mvn clean
+```bash
+# Perform a clean build
+mvn clean package
+```
 
-Other tasks:
+### Other tasks:
 	Run the tests: right-click be.uantwerpen.ansymo.semanticadaptation.tests/src/be/uantwerpen/ansymo/semanticadaptation/tests/SemanticAdaptationParsingTest.xtend -> run as -> J-Unit test
 	
 	Run the plugin: After building everything, right-click /be.uantwerpen.ansymo.semanticadaptation -> run as -> eclipse application

+ 35 - 0
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib/pom.xml

@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<relativePath>../pom.xml</relativePath>
+		<groupId>be.uantwerpen.ansymo.semanticadaptation</groupId>
+		<artifactId>parent</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+	</parent>
+
+	<artifactId>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib</artifactId>
+	<packaging>jar</packaging>
+
+	<name>be.uantwerpen.ansymo.semanticadaptation Code Generation to C++ Framework</name>
+
+
+
+	<build>
+
+		<resources>
+			<resource>
+				<directory>src/resources/hybridCosimulation-framework</directory>
+				<targetPath>${project.build.directory}/classes/hybridCosimulation-framework</targetPath>
+				<filtering>false</filtering>
+				<includes>
+					<include>**/*</include>
+				</includes>
+			</resource>
+		</resources>
+
+  </build>
+
+
+</project>

+ 1 - 0
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib/src/resources/hybridCosimulation-framework

@@ -0,0 +1 @@
+Subproject commit e06f64f8885d146ab71f3e91f5acdd1f8d61127f

+ 2 - 1
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/build.properties

@@ -3,7 +3,8 @@ source.. = src/,\
            xtend-gen/
 bin.includes = .,\
                META-INF/,\
-               plugin.xml
+               plugin.xml,\
+               jars/
 additional.bundles = org.eclipse.xtext.xbase,\
                      org.eclipse.xtext.common.types,\
                      org.eclipse.xtext.xtext.generator,\

+ 54 - 0
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/pom.xml

@@ -18,6 +18,17 @@
     <main.basedir>${project.parent.basedir}</main.basedir>
 	</properties>
 
+	<dependencies>
+
+		<dependency>
+			<groupId>be.uantwerpen.ansymo.semanticadaptation</groupId>
+			<artifactId>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib</artifactId>
+			<type>jar</type>
+			<version>${project.version}</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+
 	<build>
 		<plugins>
 
@@ -25,6 +36,49 @@
 				<groupId>org.eclipse.xtend</groupId>
 				<artifactId>xtend-maven-plugin</artifactId>
 			</plugin>
+
+
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy-dependencies</id>
+						<phase>process-resources</phase>
+						<goals>
+							<goal>copy</goal>
+						</goals>
+						<configuration>
+
+							<artifactItems>
+								
+								
+								<artifactItem>
+									<groupId>be.uantwerpen.ansymo.semanticadaptation</groupId>
+									<artifactId>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib</artifactId>
+									<type>jar</type>
+									<version>${project.version}</version>
+									
+									<overWrite>true</overWrite>
+									<!-- outputDirectory>${project.build.directory}/alternateLocation</outputDirectory> <destFileName>optional-new-name.jar</destFileName -->
+									<destFileName>cppFramework.jar</destFileName>
+								</artifactItem>
+
+							</artifactItems>
+
+
+							<outputDirectory>${project.basedir}/jars</outputDirectory>
+							<overWriteReleases>false</overWriteReleases>
+							<overWriteSnapshots>false</overWriteSnapshots>
+							<overWriteIfNewer>true</overWriteIfNewer>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+
+			
 		</plugins>
 		
 		

+ 1 - 0
DSL_SemanticAdaptation/pom.xml

@@ -16,6 +16,7 @@
 		<module>be.uantwerpen.ansymo.semanticadaptation.tests</module>
 		<module>be.uantwerpen.ansymo.semanticadaptation.ide</module>
 		<module>be.uantwerpen.ansymo.semanticadaptation.ui</module>
+	  <module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.lib</module>
 		<module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp</module>
 	  <module>be.uantwerpen.ansymo.semanticadaptation.cg.cpp.tests</module>
 		<!--module>../my.mavenized.herolanguage.ui</module>