Skip to content
Snippets Groups Projects
Commit 72d3dc34 authored by David Ebert's avatar David Ebert
Browse files

update stochastic to version 0.9.0

parent 5fa36d26
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ libxml2/2.11.5 ...@@ -5,7 +5,7 @@ libxml2/2.11.5
open-simulation-interface/3.6.0@scm/testing open-simulation-interface/3.6.0@scm/testing
osiquerylibrary/1.1.2@scm/testing osiquerylibrary/1.1.2@scm/testing
protobuf/3.20.0 protobuf/3.20.0
stochastics/0.8.0@scm/testing stochastics/0.9.0@scm/testing
units/2.3.3@scm/testing units/2.3.3@scm/testing
[options] [options]
......
################################################################################ ################################################################################
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # Copyright (c) 2024-2025 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# #
# This program and the accompanying materials are made available under the # This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at # terms of the Eclipse Public License 2.0 which is available at
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
################################################################################ ################################################################################
sources: sources:
"default":
url_https: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git
url_ssh: git@gitlab.eclipse.org:eclipse/openpass/stochastics-library.git
"0.8.0": "0.8.0":
url_https: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git url: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git
url_ssh: git@gitlab.eclipse.org:eclipse/openpass/stochastics-library.git sha256: b6d331a00c8569df7fe27f600eff59780c0b5cab
"0.9.0":
url: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git
sha256: 04852059eb3032d8f45773bb1144f3e604f2e68a
"commitid":
url: https://gitlab.eclipse.org/eclipse/openpass/stochastics-library.git
################################################################################ ################################################################################
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # Copyright (c) 2024-2025 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# #
# This program and the accompanying materials are made available under the # This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at # terms of the Eclipse Public License 2.0 which is available at
...@@ -15,58 +15,58 @@ ...@@ -15,58 +15,58 @@
from conan import ConanFile from conan import ConanFile
from conan.tools.scm import Git from conan.tools.scm import Git
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
from conan.tools.files import rm, export_conandata_patches, apply_conandata_patches
import os import os
required_conan_version = ">=2.0" required_conan_version = ">=2.2.0"
class StochasticsLibraryRecipe(ConanFile): class StochasticsLibraryRecipe(ConanFile):
name = "stochastics" name = "stochastics"
version = "0.8.0"
user = "scm"
channel = "testing"
# Binary configuration
settings = "os", "compiler", "build_type", "arch" settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]} options = {"shared": [True, False], "fPIC": [True, False],
default_options = {"shared": False, "fPIC": True} "commit_id_value":[None, "ANY"]}
default_options = {"shared": False, "fPIC": True,
# Sources are located in the same place as this recipe, copy them to the recipe "commit_id_value": None}
exports_sources = "CMakeLists.txt", "src/*", "include/*" exports_sources = "*"
no_copy_source = False
short_paths = True
commit = None
def config_options(self): def config_options(self):
if self.settings.os == "Windows": if self.settings.os == "Windows":
del self.options.fPIC del self.options.fPIC
def configure(self):
if self.options.shared:
self.options.rm_safe("fPIC")
if self.options.commit_id_value:
self.commit = self.options.commit_id_value
def export_sources(self):
export_conandata_patches(self)
def generate(self):
tc = CMakeToolchain(self)
tc.generate()
def _get_url_sha(self): def _get_url_sha(self):
if self.version in self.conan_data["sources"]: if self.version != "commitid" :
url_https = self.conan_data["sources"][self.version]["url_https"] url = self.conan_data["sources"][self.version]["url"]
url_ssh = self.conan_data["sources"][self.version]["url_ssh"] self.commit = self.conan_data["sources"][self.version]["sha256"]
sha256 = self.conan_data["sources"][self.version]["sha256"]
else: else:
url_https = self.conan_data["sources"]["default"]["url_https"] url = self.conan_data["sources"]["commitid"]["url"]
url_ssh = self.conan_data["sources"]["default"]["url_ssh"] return url
sha256 = self.version
return url_https, url_ssh, sha256
def source(self): def source(self):
url_https, url_ssh, sha256 = self._get_url_sha() url = self._get_url_sha()
git = Git(self) git = Git(self)
url = url_https
git.clone(url=url, target=self.name) git.clone(url=url, target=self.name)
git.folder=self.name git.folder=self.name
git.checkout(commit=sha256) git.checkout(commit=self.commit)
def layout(self):
cmake_layout(self)
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)
tc.generate()
def build(self): def build(self):
apply_conandata_patches(self)
cmake = CMake(self) cmake = CMake(self)
cmake.configure(build_script_folder=self.name) cmake.configure(build_script_folder=self.name)
cmake.build() cmake.build()
...@@ -76,4 +76,7 @@ class StochasticsLibraryRecipe(ConanFile): ...@@ -76,4 +76,7 @@ class StochasticsLibraryRecipe(ConanFile):
cmake.install() cmake.install()
def package_info(self): def package_info(self):
self.cpp_info.libs = ["Stochastics"] self.cpp_info.set_property("cmake_find_mode", "none")
\ No newline at end of file self.cpp_info.set_property("cmake_module_file_name", "Stochastics")
self.cpp_info.set_property("cmake_file_name", "Stochastics")
self.cpp_info.set_property("cmake_target_name", "Stochastics::Stochastics")
\ No newline at end of file
################################################################################ ################################################################################
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # Copyright (c) 2024-2025 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# #
# This program and the accompanying materials are made available under the # This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at # terms of the Eclipse Public License 2.0 which is available at
...@@ -13,4 +13,8 @@ ...@@ -13,4 +13,8 @@
################################################################################ ################################################################################
versions: versions:
"0.8.0": "0.8.0":
folder: "all"
"0.9.0":
folder: "all"
"commitid":
folder: "all" folder: "all"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment