Skip to content

Commit

Permalink
Use libcosim stable, simplify build procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
kyllingstad committed Feb 22, 2024
1 parent f42943c commit efc061f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 20 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

.idea
cmake-build-*/

build/
CMakeUserPresets.json

### Vim
*.swp
*.swp
29 changes: 13 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
libcosimc - OSP C co-simulation API
===================================
![libcosimc CI Conan](https://github.com/open-simulation-platform/libcosimc/workflows/libcosimc%20CI%20Conan/badge.svg)
This repository contains the OSP C library for co-simulations which wraps and exposes a subset of the [`libcosim`]
library's functions.

This repository contains the [OSP] C library for co-simulations, which wraps and
exposes a subset of the [libcosim] C++ library's functions.

See [`CONTRIBUTING.md`] for contributor guidelines and [`LICENSE`] for
terms of use.



How to build
------------
Please read the [libcosim build instructions]. The commands you should run
to build libcosimc are exactly the same, except that the option you need to
add to `conan install` to enable [proxy-fmu] support is
`--options="libcosim/*:proxyfmu=True`.

`libcosimc` can be built in the same way as libcosim with the following differences in [step 2]

To include FMU-proxy support use `-o libcosim:'proxyfmu=True'` when installing dependencies in

conan install .. -o libcosim:'proxyfmu=True' --build=missing

When running cmake use `-DLIBCOSIMC_USING_CONAN=TRUE`

[`CONTRIBUTING.md`]: ./CONTRIBUTING.md
[libcosim]: https://github.com/open-simulation-platform/libcosim
[libcosim build instructions]: https://github.com/open-simulation-platform/libcosim#how-to-build
[`LICENSE`]: ./LICENSE
[Step 2]: https://github.com/open-simulation-platform/libcosim#step-2-prepare-build-system
[`libcosim`]: https://github.com/open-simulation-platform/libcosim
[OSP]: https://opensimulationplatform.com/
[proxy-fmu]: https://github.com/open-simulation-platform/proxy-fmu/
7 changes: 5 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from conan import ConanFile
from conan.tools.cmake import CMake
from conan.tools.cmake import CMake, cmake_layout
from conan.tools.env import VirtualRunEnv
from conan.tools.files import load

Expand Down Expand Up @@ -45,7 +45,7 @@ def configure(self):
"doxygen/[>=1.8]",
)
requires = (
"libcosim/0.11.0@osp/testing-feature_conan-2",
"libcosim/0.10.3@osp/stable",
"boost/[>=1.71.0]",
)

Expand All @@ -56,6 +56,9 @@ def configure(self):
# Build steps
generators = "CMakeDeps", "CMakeToolchain"

def layout(self):
cmake_layout(self)

def build(self):
cmake = CMake(self)
cmake.configure()
Expand Down

0 comments on commit efc061f

Please sign in to comment.