Skip to content

Commit

Permalink
Consume YCM as a hard dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jun 18, 2018
1 parent 76c29f3 commit 1beacc3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
11 changes: 9 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ compiler:
before_install:
- if [ ! `git config --get user.email` ]; then `git config --global user.email '[email protected]'`; fi
- if [ ! `git config --get user.name` ]; then `git config --global user.name 'Travis CI'`; fi
- '[[ "$TRAVIS_EVENT_TYPE" = cron ]] && export YARP_CHECKOUT=devel || export YARP_CHECKOUT=master'
- '[[ "$TRAVIS_EVENT_TYPE" = cron ]] && export ROBOTOLOGY_CHECKOUT=devel || export ROBOTOLOGY_CHECKOUT=master'

install:
# Install color-debug
Expand All @@ -23,8 +23,15 @@ install:
- cd ../..
#-- Install googletest
- sudo apt-get install libgtest-dev
#-- Install YCM
- git clone --branch="$ROBOTOLOGY_CHECKOUT" https://github.com/robotology/ycm
- cd ycm && mkdir build && cd build
- cmake ..
- make -j$(nproc)
- sudo make install
- cd ../..
#-- Install yarp
- git clone --branch="$YARP_CHECKOUT" https://github.com/robotology/yarp
- git clone --branch="$ROBOTOLOGY_CHECKOUT" https://github.com/robotology/yarp
- cd yarp && mkdir build && cd build
- cmake .. -DSKIP_ACE=ON
- make
Expand Down
9 changes: 2 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ set(BUILD_SHARED_LIBS TRUE CACHE INTERNAL "hide this!")
# Set module path.
set(ROBOTICSLAB_TOOLS_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

list(APPEND CMAKE_MODULE_PATH ${ROBOTICSLAB_TOOLS_MODULE_PATH}
${CMAKE_SOURCE_DIR}/cmake/ycm-modules)

# Bootstrap YCM.
# https://github.com/robotology/ycm/issues/118
set(YCM_TAG v0.6.0)
include(YCMBootstrap)
list(APPEND CMAKE_MODULE_PATH ${ROBOTICSLAB_TOOLS_MODULE_PATH})

# Find project's hard dependencies
find_package(YCM 0.6 REQUIRED)
find_package(COLOR_DEBUG REQUIRED)

# Retrieve current ROBOTICSLAB_TOOLS version.
Expand Down
3 changes: 1 addition & 2 deletions doc/tools-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

First install the dependencies:
- [Install CMake](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-cmake.md)
- [Install YCM](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-ycm.md)
- [Install YARP](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-yarp.md)
- [Install color-debug](https://github.com/roboticslab-uc3m/color-debug)

Additionally, this project depends on YCM to download and use additional CMake modules. Although this process is intended to run automatically during the CMake configuration phase, you may still want to install YCM by yourself. In that respect, refer to [Install YCM](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-ycm.md).

For unit testing, you'll need the googletest source package. Refer to [Install googletest](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-googletest.md).

### Install tools on Ubuntu (working on all tested versions)
Expand Down

0 comments on commit 1beacc3

Please sign in to comment.