Closed traversaro closed 6 years ago
@drdanz If you agree on the proposed solution, I can proceed in providing a PR.
Apparently I was wrong, and the same problem occurs if YARP is generated without YCM: https://travis-ci.org/robotology/icub-tests/jobs/389236808#L5408 .
Good old issue related to this: https://github.com/robotology/codyco-superbuild/issues/15 .
I'm unable to reproduce this at e709b46 (and https://github.com/robotology/ycm/commit/9e2c204f3a2ac9dd3554f5503388e291e375d683). YCM is found on system by
https://github.com/robotology/yarp/blob/e709b46698ecb4eb335bd52b17e4163393836dca/CMakeLists.txt#L33
This call loads YCM module paths into CMAKE_MODULE_PATH
via YCMConfig.cmake
and then enables YARP_manager to locate the FindTinyXML.cmake
file.
I see this error when I uninstall YCM, though. Could you have installed YCM master by chance, and are you sure that YARP is in fact using an external YCM? YARP requires YCM 0.7.0 since quite recently (https://github.com/robotology/yarp/commit/84e1d355131568529b801d7b30bd5cccac6b3c96) and discards 0.6.0 in the call referenced in my previous comment.
Please check #1739 against your sample project.
@traversaro is this still an issue with latest master?
Given that robot-testing and icub-tests seem to be working fine in devel
(I think @diegoferigo checked this) I think this issue can be closed.
I just ran into this on YARP 3.9, but the issue disappeared after cleaning the build folder and reconfiguring from scratch. I noticed the presence of a build/YARP_priv_tinyxml/ directory (it was not re-generated after the cleanup), and that the YARP_manager and YARP_robotinterface components had a find_dependency(YARP_priv_TinyXML)
line in their xxxConfig.cmake file. Obviously, the names don't match, note the different letter casing: tinyxml vs TinyXML.
Describe the bug If you have
find_package(YARP COMPONENTS manager REQUIRED)
using a YARP installed with YCM, you get the following error:To Reproduce Configure a downstream project with
find_package(YARP COMPONENTS manager REQUIRED)
in its CMakeLists.txt , do not havefind_package(YCM)
in the same downstream project and make sure that YARP was configured/installed using an external YCMExpected behavior
find_package(YARP COMPONENTS manager REQUIRED)
should work fine.Configuration (please complete the following information):
Proposed solution If
YARP
is configured using an external YCM (and so it is not installing YCM CMake modules) afind_dependency(YCM)
should be added inYARPConfig.cmake
.