Commit 55654c69 authored by Sascha Niklas Schneiders's avatar Sascha Niklas Schneiders
Browse files

fixed conflict

parents cc0b15d7 aa02c297
Pipeline #81607 passed with stage
in 35 minutes and 14 seconds
......@@ -31,8 +31,7 @@
<groupId>de.monticore.lang.monticar</groupId>
<artifactId>embedded-montiarc-math-generator</artifactId>
<version>0.0.25.1-SNAPSHOT</version>
<version>0.0.27-SNAPSHOT</version>
<!-- == PROJECT DEPENDENCIES ============================================= -->
......
......@@ -69,7 +69,7 @@ public class CMakeConfig {
private CMakeListsCPPViewModel cMakeListsViewModel = new CMakeListsCPPViewModel();
private HashSet<CMakeFindModule> moduleList = new HashSet<>();
private List<CMakeFindModule> moduleList = new ArrayList<>();
private List<String> cmakeCommandList = new ArrayList<>();
......
......@@ -39,7 +39,7 @@ public class CMakeListsCPPViewModel extends ViewModelBase {
// fields
private String compName;
private HashSet<CMakeFindModule> moduleDependencies;
private List<CMakeFindModule> moduleDependencies;
private List<String> cmakeCommandList = new ArrayList<>();
......@@ -55,11 +55,11 @@ public class CMakeListsCPPViewModel extends ViewModelBase {
this.compName = compName;
}
public HashSet<CMakeFindModule> getModuleDependencies() {
public List<CMakeFindModule> getModuleDependencies() {
return moduleDependencies;
}
public void setModuleDependencies(HashSet<CMakeFindModule> moduleDependencies) {
public void setModuleDependencies(List<CMakeFindModule> moduleDependencies) {
this.moduleDependencies = moduleDependencies;
}
......
......@@ -458,19 +458,16 @@ public class GeneratorCPP implements Generator {
// add jni
cmake.addCMakeCommand("find_package(JNI)");
cmake.addCMakeCommand("set(INCLUDE_DIRS ${INCLUDE_DIRS} ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2})");
// set install dir
cmake.addCMakeCommand("IF (WIN32)");
cmake.addCMakeCommand("set(CMAKE_INSTALL_PREFIX $ENV{DLL_DIR})");
cmake.addCMakeCommand("ELSE()");
cmake.addCMakeCommand("set(CMAKE_INSTALL_PREFIX /usr/lib)");
cmake.addCMakeCommand("ENDIF()");
// create shared lib
cmake.addCMakeCommandEnd("add_library(AutopilotAdapter SHARED AutopilotAdapter.cpp ${CMAKE_CURRENT_SOURCE_DIR})");
cmake.addCMakeCommandEnd("target_include_directories(AutopilotAdapter PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})");
cmake.addCMakeCommandEnd("target_link_libraries(AutopilotAdapter PUBLIC ${LIBS})");
cmake.addCMakeCommandEnd("set_target_properties(AutopilotAdapter PROPERTIES LINKER_LANGUAGE CXX)");
cmake.addCMakeCommand("IF (WIN32)");
cmake.addCMakeCommandEnd("set_target_properties(AutopilotAdapter PROPERTIES PREFIX \"\")");
cmake.addCMakeCommand("ENDIF()");
// install shared lib
cmake.addCMakeCommandEnd("install(TARGETS AutopilotAdapter DESTINATION \"./\")");
cmake.addCMakeCommandEnd("install(TARGETS AutopilotAdapter DESTINATION $ENV{DLL_DIR})");
cmake.addCMakeCommandEnd("export(TARGETS AutopilotAdapter FILE de_rwth_armin_modeling_autopilot_autopilotAdapter.cmake)");
}
......
......@@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH ${r"${CMAKE_MODULE_PATH}"} ${r"${CMAKE_CURRENT_SOURCE_DIR}
# add dependencies
<#list viewModel.moduleDependencies as var>
find_package(${var.packageName} <#if var.required>REQUIRED<#else>OPTIONAL</#if>)
find_package(${var.packageName} <#if var.required>REQUIRED<#else></#if>)
<#if var.findPath>set(INCLUDE_DIRS ${r"${INCLUDE_DIRS}"} ${r"${"}${var.packageName}${r"_INCLUDE_DIRS}"})</#if>
<#if var.findLibrary>set(LIBS ${r"${LIBS}"} ${r"${"}${var.packageName}${r"_LIBRARIES}"})</#if>
</#list>
......@@ -21,7 +21,7 @@ ${cmd}
# create static library
include_directories(${r"${INCLUDE_DIRS}"})
add_library(${viewModel.compName} ${viewModel.compName}.h)
target_include_directories(${viewModel.compName} PUBLIC ${r"${CMAKE_CURRENT_SOURCE_DIR}"})
target_include_directories(${viewModel.compName} PUBLIC ${r"${CMAKE_CURRENT_SOURCE_DIR}"} ${r"${INCLUDE_DIRS}"})
target_link_libraries(${viewModel.compName} PUBLIC ${r"${LIBS}"})
set_target_properties(${viewModel.compName} PROPERTIES LINKER_LANGUAGE CXX)
......
......@@ -16,7 +16,7 @@ set(LIBS ${LIBS} ${Armadillo_LIBRARIES})
# create static library
include_directories(${INCLUDE_DIRS})
add_library(test_basicConstantAssignment test_basicConstantAssignment.h)
target_include_directories(test_basicConstantAssignment PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(test_basicConstantAssignment PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${INCLUDE_DIRS})
target_link_libraries(test_basicConstantAssignment PUBLIC ${LIBS})
set_target_properties(test_basicConstantAssignment PROPERTIES LINKER_LANGUAGE CXX)
......
......@@ -16,7 +16,7 @@ set(LIBS ${LIBS} ${Armadillo_LIBRARIES})
# create static library
include_directories(${INCLUDE_DIRS})
add_library(test_basicPortsMath test_basicPortsMath.h)
target_include_directories(test_basicPortsMath PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(test_basicPortsMath PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${INCLUDE_DIRS})
target_link_libraries(test_basicPortsMath PUBLIC ${LIBS})
set_target_properties(test_basicPortsMath PROPERTIES LINKER_LANGUAGE CXX)
......
......@@ -16,7 +16,7 @@ set(LIBS ${LIBS} ${Armadillo_LIBRARIES})
# create static library
include_directories(${INCLUDE_DIRS})
add_library(test_math_floatDivisionTest test_math_floatDivisionTest.h)
target_include_directories(test_math_floatDivisionTest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(test_math_floatDivisionTest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${INCLUDE_DIRS})
target_link_libraries(test_math_floatDivisionTest PUBLIC ${LIBS})
set_target_properties(test_math_floatDivisionTest PROPERTIES LINKER_LANGUAGE CXX)
......
......@@ -16,7 +16,7 @@ set(LIBS ${LIBS} ${Armadillo_LIBRARIES})
# create static library
include_directories(${INCLUDE_DIRS})
add_library(testing_model testing_model.h)
target_include_directories(testing_model PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(testing_model PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${INCLUDE_DIRS})
target_link_libraries(testing_model PUBLIC ${LIBS})
set_target_properties(testing_model PROPERTIES LINKER_LANGUAGE CXX)
......
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