Skip to content

Commit b427fe2

Browse files
committed
Make YCM a hard dependency
Fixes #2078
1 parent 8eac141 commit b427fe2

File tree

148 files changed

+37
-23869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+37
-23869
lines changed

CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ set(PROJECT_DESCRIPTION "YARP: A thin middleware for humanoid robots and more")
2828
set(YARP_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
2929
list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_DIR})
3030

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

3636
# Get the current YARP version.
3737
# See cmake/YarpVersion.cmake.

cmake/CMakeLists.txt

+23
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,26 @@ foreach(_f YarpDeprecatedWarning.cmake # since YARP 3.0.0
3434
deprecated/YarpBackupVariable.cmake)
3535
yarp_remove_file("share/yarp/cmake/${_f}")
3636
endforeach()
37+
38+
# Remove old YCM internal installations
39+
foreach(_d ycm-0.6.0 # since YARP 3.0.0
40+
ycm-0.7.0
41+
ycm-0.8.0
42+
ycm-0.8.1 # since YARP 3.0.1
43+
ycm-0.8.20180628.11
44+
ycm-0.8.20180712.5
45+
ycm-0.8.20180720.3
46+
ycm-0.9.0 # since YARP 3.1.1
47+
ycm-0.9.0.8
48+
ycm-0.9.20181128.10
49+
ycm-0.9.20181204.8
50+
ycm-0.9.20190213.9
51+
ycm-0.9.20190315.16
52+
ycm-0.9.20190329.27
53+
ycm-0.10.0
54+
ycm-0.10.1
55+
ycm-0.10.2
56+
ycm-0.10.3
57+
ycm-0.11.0) # since YARP 3.3.0
58+
yarp_remove_directory("share/yarp/cmake/${_d}")
59+
endforeach()

cmake/template/YARPConfig.cmake.in

+5-37
Original file line numberDiff line numberDiff line change
@@ -93,48 +93,16 @@ set(YARP_IDL_BINARY_HINT "@PACKAGE_YARP_IDL_BINARY_HINT@")
9393
# CMake modules directories
9494
set_and_check(YARP_MODULE_DIR "@PACKAGE_YARP_MODULE_DIR@")
9595

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

102-
# Find YCM if needed:
103-
# * If YARP is static therefore we need YCM (or YARP private version) for private
104-
# dependencies.
105-
# * If deprecated stuff is enabled, we need YCM (or YARP private version) for
106-
# compatibility with old versions.
107-
# If YCM is not found, the private version is used instead.
108-
if(NOT YARP_IS_SHARED_LIBRARY OR NOT YARP_NO_DEPRECATED)
109-
# Until YCM is optional, we always want to look for YCM quietly, therefore we
110-
# use find_package instead of find_dependency.
111-
# WARNING find_package(YCM) will overwrite the PACKAGE_PREFIX_DIR variable,
112-
# therefore this variable is no longer valid after this line
113-
get_property(_yarp_ycm_transitive_dependency_set GLOBAL PROPERTY _CMAKE_YCM_TRANSITIVE_DEPENDENCY SET)
114-
find_package(YCM @YCM_REQUIRED_VERSION@ QUIET)
115-
# Ensure that YCM is not shown by FeatureSummary if not requested by the user
116-
if(NOT _yarp_ycm_transitive_dependency_set)
117-
set_property(GLOBAL PROPERTY _CMAKE_YCM_TRANSITIVE_DEPENDENCY TRUE)
118-
endif()
119-
if(NOT YARP_NO_DEPRECATED)
120-
if(YCM_FOUND)
121-
set(_YARP_YCM_MODULE_PATH ${YCM_MODULE_PATH})
122-
else()
123-
set_and_check(YARP_YCM_MODULE_DIR "@PACKAGE_YARP_YCM_MODULE_DIR@")
124-
set(_YARP_YCM_MODULE_PATH "${YARP_YCM_MODULE_DIR}/find-modules"
125-
"${YARP_YCM_MODULE_DIR}/modules"
126-
"${YARP_YCM_MODULE_DIR}/3rdparty"
127-
"${YARP_YCM_MODULE_DIR}/cmake-proposed")
128-
if(${CMAKE_VERSION} VERSION_LESS 3.8)
129-
list(APPEND _YARP_YCM_MODULE_PATH "${YARP_YCM_MODULE_DIR}/cmake-3.8/Modules")
130-
endif()
131-
132-
# We need these paths in order to use the find modules in the following
133-
# find_package/find_dependency calls (those are automatically added by
134-
# YCM)
135-
list(APPEND CMAKE_MODULE_PATH ${_YARP_YCM_MODULE_PATH})
136-
endif()
137-
endif()
101+
# Find YCM if YARP is static therefore we need YCM (or YARP private version) for
102+
# private dependencies.
103+
if(NOT YARP_IS_SHARED_LIBRARY)
104+
include(CMakeFindDependencyMacro)
105+
find_dependency(YCM @YCM_REQUIRED_VERSION@ REQUIRED)
138106
endif()
139107

140108

doc/release/master/remove_ycm.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
remove_ycm {master}
2+
-------------------
3+
4+
### Important Changes
5+
6+
* YCM 0.11 or later is now a hard dependency

extern/ycm/CMakeLists.txt

-102
This file was deleted.

extern/ycm/README.txt

-48
This file was deleted.

0 commit comments

Comments
 (0)