Skip to content

Commit

Permalink
Merge pull request #2232 from drdanz/remove_ycm
Browse files Browse the repository at this point in the history
Make YCM a hard dependency
  • Loading branch information
drdanz authored Mar 17, 2020
2 parents 9d6a196 + b427fe2 commit d315ae5
Show file tree
Hide file tree
Showing 150 changed files with 62 additions and 23,877 deletions.
13 changes: 12 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ init:

- cmd: set TIMEOUT=%SystemRoot%\System32\timeout.exe

# Dependencies found in YARP and iCub packages
# Dependencies found in YCM, YARP and iCub packages
- cmd: set YCM_LATEST=0.11.0
- cmd: set YCM_LATEST_TAG=v%YCM_LATEST%
- cmd: set YCM_DIR=%ROBOTOLOGY_ROOT%\ycm-%YCM_LATEST%

- cmd: set YARP_LATEST=2.3.70
- cmd: set YARP_LATEST_TAG=v%YARP_LATEST%
- cmd: set YARP_LATEST_PKG=1
Expand Down Expand Up @@ -78,6 +82,7 @@ init:
#- cmd: set PATH=%PATH%;%JPEG_ROOT%\bin

# Installers URLs
- cmd: set YCM_INSTALLER=https://github.com/robotology/ycm/releases/download/%YCM_LATEST_TAG%/YCM-%YCM_LATEST%-all.tar.gz
- cmd: set YARP_INSTALLER=https://github.com/robotology/yarp/releases/download/%YARP_LATEST_TAG%/yarp_%YARP_LATEST%_%ROBOTOLOGY_VS%_%ROBOTOLOGY_ARCH%_1.exe
- cmd: set ICUB_INSTALLER=https://github.com/robotology/icub-main/releases/download/%ICUB_LATEST_TAG%/iCub_%ICUB_LATEST%_%ROBOTOLOGY_VS%_%ROBOTOLOGY_ARCH%_1.exe
#- cmd: if "%platform%"=="Win32" set JPEG_INSTALLER=https://sourceforge.net/projects/libjpeg-turbo/files/1.5.1/libjpeg-turbo-1.5.1-vc.exe/download
Expand All @@ -95,6 +100,12 @@ init:
install:
- cmd: md C:\downloads

# Get YCM installer
- cmd: echo Downloading %YCM_INSTALLER%
- cmd: appveyor DownloadFile "%YCM_INSTALLER%" -FileName "C:\downloads\ycm.tar.gz"
- cmd: 7z x "C:\downloads\ycm.tar.gz" -so | 7z x -si -ttar > nul
- cmd: move YCM-%YCM_LATEST%-all "%YCM_DIR%"

# Get YARP installer
- cmd: echo Downloading %YARP_INSTALLER%
- cmd: appveyor DownloadFile "%YARP_INSTALLER%" -FileName "C:\downloads\yarp.exe"
Expand Down
20 changes: 13 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,14 +301,15 @@ git:
services:
- docker
before_install:
- docker pull drdanz/cmake:cmake-${TRAVIS_CMAKE_VERSION}
- docker pull drdanz/ycm:cmake-${TRAVIS_CMAKE_VERSION}_ycm-${TRAVIS_YCM_VERSION}
- >-
docker run -it -d \
-v $TRAVIS_BUILD_DIR:$TRAVIS_BUILD_DIR \
-v $HOME/.ccache:$HOME/.ccache \
-w $TRAVIS_BUILD_DIR \
--name yarp-builder \
drdanz/cmake:cmake-${TRAVIS_CMAKE_VERSION}
drdanz/ycm:cmake-${TRAVIS_CMAKE_VERSION}_ycm-${TRAVIS_YCM_VERSION}
- >-
- docker exec -it yarp-builder cmake --version
- docker exec -it yarp-builder mkdir $TRAVIS_BUILD_DIR/build
install: skip
Expand Down Expand Up @@ -469,33 +470,38 @@ matrix:

- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.12"
name: "Configure using CMake 3.12 and YCM 0.11.0"
env:
- TRAVIS_CMAKE_VERSION="3.12"
- TRAVIS_YCM_VERSION="0.11.0"

- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.13"
name: "Configure using CMake 3.13 and YCM 0.11.0"
env:
- TRAVIS_CMAKE_VERSION="3.13"
- TRAVIS_YCM_VERSION="0.11.0"

- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.14"
name: "Configure using CMake 3.14 and YCM 0.11.0"
env:
- TRAVIS_CMAKE_VERSION="3.14"
- TRAVIS_YCM_VERSION="0.11.0"

- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.15"
name: "Configure using CMake 3.15 and YCM 0.11.0"
env:
- TRAVIS_CMAKE_VERSION="3.15"
- TRAVIS_YCM_VERSION="0.11.0"

- stage: cmake
<<: *cmake_configure_template
name: "Configure using CMake 3.16"
name: "Configure using CMake 3.16 and YCM 0.11.0"
env:
- TRAVIS_CMAKE_VERSION="3.16"
- TRAVIS_YCM_VERSION="0.11.0"

- stage: test
<<: *linux_gcc_build_template
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ set(PROJECT_DESCRIPTION "YARP: A thin middleware for humanoid robots and more")
set(YARP_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_DIR})


# Find or use YCM version in extern.
# Find YCM
# This is required here, because YarpVersion uses GitInfo from YCM
add_subdirectory(extern/ycm)
set(YCM_REQUIRED_VERSION 0.11.0) # Used also by YarpFindDependencies
find_package(YCM ${YCM_REQUIRED_VERSION} REQUIRED)

# Get the current YARP version.
# See cmake/YarpVersion.cmake.
Expand Down
23 changes: 23 additions & 0 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,26 @@ foreach(_f YarpDeprecatedWarning.cmake # since YARP 3.0.0
deprecated/YarpBackupVariable.cmake)
yarp_remove_file("share/yarp/cmake/${_f}")
endforeach()

# Remove old YCM internal installations
foreach(_d ycm-0.6.0 # since YARP 3.0.0
ycm-0.7.0
ycm-0.8.0
ycm-0.8.1 # since YARP 3.0.1
ycm-0.8.20180628.11
ycm-0.8.20180712.5
ycm-0.8.20180720.3
ycm-0.9.0 # since YARP 3.1.1
ycm-0.9.0.8
ycm-0.9.20181128.10
ycm-0.9.20181204.8
ycm-0.9.20190213.9
ycm-0.9.20190315.16
ycm-0.9.20190329.27
ycm-0.10.0
ycm-0.10.1
ycm-0.10.2
ycm-0.10.3
ycm-0.11.0) # since YARP 3.3.0
yarp_remove_directory("share/yarp/cmake/${_d}")
endforeach()
42 changes: 5 additions & 37 deletions cmake/template/YARPConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,48 +93,16 @@ set(YARP_IDL_BINARY_HINT "@PACKAGE_YARP_IDL_BINARY_HINT@")
# CMake modules directories
set_and_check(YARP_MODULE_DIR "@PACKAGE_YARP_MODULE_DIR@")


# Save the variables, that it should not be modified by find_package(YARP), but
# we need to modify it in order to find all the dependencies.
set(_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
set(_YCM_FOUND ${YCM_FOUND})

# Find YCM if needed:
# * If YARP is static therefore we need YCM (or YARP private version) for private
# dependencies.
# * If deprecated stuff is enabled, we need YCM (or YARP private version) for
# compatibility with old versions.
# If YCM is not found, the private version is used instead.
if(NOT YARP_IS_SHARED_LIBRARY OR NOT YARP_NO_DEPRECATED)
# Until YCM is optional, we always want to look for YCM quietly, therefore we
# use find_package instead of find_dependency.
# WARNING find_package(YCM) will overwrite the PACKAGE_PREFIX_DIR variable,
# therefore this variable is no longer valid after this line
get_property(_yarp_ycm_transitive_dependency_set GLOBAL PROPERTY _CMAKE_YCM_TRANSITIVE_DEPENDENCY SET)
find_package(YCM @YCM_REQUIRED_VERSION@ QUIET)
# Ensure that YCM is not shown by FeatureSummary if not requested by the user
if(NOT _yarp_ycm_transitive_dependency_set)
set_property(GLOBAL PROPERTY _CMAKE_YCM_TRANSITIVE_DEPENDENCY TRUE)
endif()
if(NOT YARP_NO_DEPRECATED)
if(YCM_FOUND)
set(_YARP_YCM_MODULE_PATH ${YCM_MODULE_PATH})
else()
set_and_check(YARP_YCM_MODULE_DIR "@PACKAGE_YARP_YCM_MODULE_DIR@")
set(_YARP_YCM_MODULE_PATH "${YARP_YCM_MODULE_DIR}/find-modules"
"${YARP_YCM_MODULE_DIR}/modules"
"${YARP_YCM_MODULE_DIR}/3rdparty"
"${YARP_YCM_MODULE_DIR}/cmake-proposed")
if(${CMAKE_VERSION} VERSION_LESS 3.8)
list(APPEND _YARP_YCM_MODULE_PATH "${YARP_YCM_MODULE_DIR}/cmake-3.8/Modules")
endif()

# We need these paths in order to use the find modules in the following
# find_package/find_dependency calls (those are automatically added by
# YCM)
list(APPEND CMAKE_MODULE_PATH ${_YARP_YCM_MODULE_PATH})
endif()
endif()
# Find YCM if YARP is static therefore we need YCM (or YARP private version) for
# private dependencies.
if(NOT YARP_IS_SHARED_LIBRARY)
include(CMakeFindDependencyMacro)
find_dependency(YCM @YCM_REQUIRED_VERSION@ REQUIRED)
endif()


Expand Down
6 changes: 6 additions & 0 deletions doc/release/master/remove_ycm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
remove_ycm {master}
-------------------

### Important Changes

* YCM 0.11 or later is now a hard dependency
102 changes: 0 additions & 102 deletions extern/ycm/CMakeLists.txt

This file was deleted.

48 changes: 0 additions & 48 deletions extern/ycm/README.txt

This file was deleted.

Loading

0 comments on commit d315ae5

Please sign in to comment.