diff --git a/.travis.yml b/.travis.yml index 7f93b64..06c6d7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ compiler: before_install: - if [ ! `git config --get user.email` ]; then `git config --global user.email 'user@example.com'`; 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 @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 65c1f61..ad56a6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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. diff --git a/doc/tools-install.md b/doc/tools-install.md index f1310a4..99710d2 100644 --- a/doc/tools-install.md +++ b/doc/tools-install.md @@ -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)