Closed traversaro closed 9 months ago
Thanks @gabrielenava @davidetome @davidegorbani @nicktrem for reporting the issue! As I shown to the iRonCub team, if this happens in the future you can specify any (hopefully working) version of YCM to use to the superbuild by passing the -DYCM_TAG=v0.16.2
(in place of v0.16.2
, use the tag that you want to use) CMake option to the superbuild.
https://github.com/robotology/ycm/pull/442 contained a critical regression, if
CMAKE_EXPORT_COMPILE_COMMANDS
was not defined, the superbuild failed with:The problem is that if
CMAKE_EXPORT_COMPILE_COMMANDS
is not defined,${CMAKE_EXPORT_COMPILE_COMMANDS}
evaluates to an empty string, and:is not syntactically valid cmake. The fix is to use
CMAKE_EXPORT_COMPILE_COMMANDS
instead of${CMAKE_EXPORT_COMPILE_COMMANDS}
, as in that way the if is always a valid cmake syntax:and the if of CMake automatically dereference a variable if it finds it in the if clause.