Skip to content

Commit

Permalink
Enable use of tomlplusplus in bipedal-locomotion-framework if ROBOTOL…
Browse files Browse the repository at this point in the history
…OGY_ENABLE_DYNAMICS_FULL_DEPS is enabled (#1365)
  • Loading branch information
traversaro authored Mar 16, 2023
1 parent 075c873 commit 3d587be
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
shell: bash -l {0}
run: |
# Dependencies
mamba install ace asio assimp boost eigen freetype gazebo glew glfw glm graphviz gsl ipopt irrlicht jpeg libmatio libode libxml2 nlohmann_json pcl vtk "opencv==4.6" portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr "cmake==3.25" compilers make ninja pkg-config
mamba install ace asio assimp boost eigen freetype gazebo glew glfw glm graphviz gsl ipopt irrlicht jpeg libmatio libode libxml2 nlohmann_json pcl vtk "opencv==4.6" portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr "cmake==3.25" compilers make ninja pkg-config tomlplusplus
# Python
mamba install python numpy swig pybind11 pyqt matplotlib h5py tornado u-msgpack-python pyzmq ipython
Expand Down
6 changes: 6 additions & 0 deletions cmake/Buildbipedal-locomotion-framework.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ if (ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS)
find_or_build_package(qhull QUIET)
list(APPEND bipedal-locomotion-framework_DEPENDS qhull)
endif()

if (ROBOTOLOGY_BUILD_tomlplusplus)
find_or_build_package(tomlplusplus QUIET)
list(APPEND bipedal-locomotion-framework_DEPENDS tomlplusplus)
endif()
endif()

# For what regards Python installation, the options changes depending
Expand Down Expand Up @@ -73,6 +78,7 @@ ycm_ep_helper(bipedal-locomotion-framework TYPE GIT
-DFRAMEWORK_USE_cppad:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS}
-DFRAMEWORK_USE_casadi:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS}
-DFRAMEWORK_USE_LieGroupControllers:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS}
-DFRAMEWORK_USE_tomlplusplus:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS}
-DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=${ROBOTOLOGY_USES_PYTHON}
${bipedal-locomotion-framework_OPTIONAL_CMAKE_ARGS}
DEPENDS ${bipedal-locomotion-framework_DEPENDS})
Expand Down
15 changes: 15 additions & 0 deletions cmake/Buildtomlplusplus.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2023 Fondazione Istituto Italiano di Tecnologia
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

include(YCMEPHelper)

ycm_ep_helper(tomlplusplus
TYPE GIT
STYLE GITHUB
REPOSITORY marzer/tomlplusplus.git
TAG master
COMPONENT core
FOLDER src)

set(tomlplusplus_CONDA_PKG_NAME tomlplusplus)
set(tomlplusplu_CONDA_PKG_CONDA_FORGE_OVERRIDE ON)
7 changes: 7 additions & 0 deletions cmake/RobotologySuperbuildLogic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ else()
endif()
endif()

# On conda-forge we get tomlplusplus from conda-forge, otherwise we build it
if(ROBOTOLOGY_CONFIGURING_UNDER_CONDA)
set(ROBOTOLOGY_BUILD_tomlplusplus OFF)
else()
set(ROBOTOLOGY_BUILD_tomlplusplus ON)
endif()

# Core
if(ROBOTOLOGY_ENABLE_CORE)
find_or_build_package(YARP)
Expand Down
2 changes: 1 addition & 1 deletion doc/conda-forge.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ of the robotology-superbuild.**

Once you activated it, you can install packages in it. In particular the dependencies for the robotology-superbuild can be installed as:
~~~
mamba install -c conda-forge ace asio assimp boost eigen freetype gazebo glew glfw glm graphviz gsl ipopt irrlicht jpeg libmatio libode libxml2 nlohmann_json pcl "opencv<=4.6" portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr qhull "cmake<=3.25" compilers make ninja pkg-config
mamba install -c conda-forge ace asio assimp boost eigen freetype gazebo glew glfw glm graphviz gsl ipopt irrlicht jpeg libmatio libode libxml2 nlohmann_json pcl "opencv<=4.6" portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr qhull "cmake<=3.25" compilers make ninja pkg-config tomlplusplus
~~~

If you are on **Linux**, you also need to install also the following packages:
Expand Down
4 changes: 4 additions & 0 deletions releases/latest.releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,7 @@ repositories:
type: git
url: https://github.com/robotology/find-superquadric.git
version: v1.1.0
tomlplusplus:
type: git
url: https://github.com/marzer/tomlplusplus.git
version: v3.3.0

0 comments on commit 3d587be

Please sign in to comment.