Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

Commit 5c7f015e authored by Alexander David Hellwig's avatar Alexander David Hellwig
Browse files

Renamed x_yAdapter to yAdapter_x, avoids name conflicts

parent 43b15dbd
......@@ -30,11 +30,11 @@ public class DummyMiddlewareGenerator implements GeneratorImpl {
"#include <chrono>\n" +
"#include \"IAdapter.h\"\n" +
"\n" +
"class ${compName}_DummyAdapter: public IAdapter{\n" +
"class DummyAdapter_${compName}: public IAdapter{\n" +
"\t${compName}* component;\n" +
"\n" +
"public:\n" +
"\t${compName}_DummyAdapter(){\n" +
"\tDummyAdapter_${compName}(){\n" +
"\n" +
"\t}\n" +
"\n" +
......@@ -59,7 +59,7 @@ public class DummyMiddlewareGenerator implements GeneratorImpl {
.replace("${compName}", name);
FileContent res = new FileContent();
res.setFileName(name + "_DummyAdapter.h");
res.setFileName("DummyAdapter_" + name + ".h");
res.setFileContent(content);
return res;
}
......@@ -72,13 +72,13 @@ public class DummyMiddlewareGenerator implements GeneratorImpl {
private String cmakeTemplate =
"cmake_minimum_required(VERSION 3.5)\n" +
"project (${compName}_DummyAdapter)\n" +
"project (DummyAdapter_${compName})\n" +
"\n" +
"add_library(${compName}_DummyAdapter ${compName}_DummyAdapter.h)\n" +
"set_target_properties(${compName}_DummyAdapter PROPERTIES LINKER_LANGUAGE CXX)\n" +
"target_link_libraries(${compName}_DummyAdapter ${compName})\n" +
"target_include_directories(${compName}_DummyAdapter PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})\n" +
"export(TARGETS ${compName}_DummyAdapter FILE ${compName}_DummyAdapter.cmake)";
"add_library(DummyAdapter_${compName} DummyAdapter_${compName}.h)\n" +
"set_target_properties(DummyAdapter_${compName} PROPERTIES LINKER_LANGUAGE CXX)\n" +
"target_link_libraries(DummyAdapter_${compName} ${compName})\n" +
"target_include_directories(DummyAdapter_${compName} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})\n" +
"export(TARGETS DummyAdapter_${compName} FILE DummyAdapter_${compName}.cmake)";
private FileContent generateCMake(ExpandedComponentInstanceSymbol componentInstanceSymbol) {
FileContent res = new FileContent();
......
......@@ -114,15 +114,13 @@ public class MiddlewareMasterGenerator extends CMakeMasterGenerator {
.map(File::getName)
.collect(Collectors.toList());
//TODO: DIRTY HACK!
String includes = filesNames.stream()
.filter(fn -> fn.matches(name + "\\w*\\.h"))
.filter(fn -> fn.matches("(\\w+(Adapter_))?(" + name + "\\.h)"))
.map(fn -> "#include \"" + fn + "\"")
.collect(Collectors.joining("\n"));
//TODO: DIRTY HACK!
String addAdapters = filesNames.stream()
.filter(fn -> fn.matches(name + "\\w*Adapter\\.h"))
.filter(fn -> fn.matches("\\w+Adapter_" + name + "\\.h"))
.map(fn -> fn.substring(0, fn.length() - 2))
.map(fn -> " adapters.push_back(new " + fn + "());")
.collect(Collectors.joining("\n"));
......@@ -160,7 +158,7 @@ public class MiddlewareMasterGenerator extends CMakeMasterGenerator {
String targets = files.stream()
.map(File::getName)
.filter(fn -> fn.matches(name + "\\w*\\.h"))
.filter(fn -> fn.matches("(\\w+(Adapter_))?(" + name + "\\.h)"))
.map(fn -> fn.substring(0, fn.length() - 2))
.collect(Collectors.joining(" "));
......
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