Fix https://github.com/robotology/robotology-superbuild/issues/1700 . To be honest, I have no idea how this ever worked, or how it was working for users that reported that it was working fine for them (@LoreMoretti). However, if we want that executing a target always re-compile the project, indeed the ExternalProject's BUILD_ALWAYS option is explicitly designed for that:
BUILD_ALWAYS
Enabling this option forces the build step to always be run. This can be the easiest way to robustly ensure that the external project's own build dependencies are evaluated rather than relying on the default success timestamp-based method. This option is not normally needed unless developers are expected to modify something the external project's build depends on in a way that is not detectable via the step target dependencies (e.g. SOURCE_DIR is used without a download method and developers might modify the sources in SOURCE_DIR).
Just to permit users that want to set BUILD_ALWAYS to OFF, the option is now also exposed by YCMEPHelper, but its default value there is ON, while the default value of BUILD_ALWAYS in ExternalProject is OFF.
Fix https://github.com/robotology/robotology-superbuild/issues/1700 . To be honest, I have no idea how this ever worked, or how it was working for users that reported that it was working fine for them (@LoreMoretti). However, if we want that executing a target always re-compile the project, indeed the ExternalProject's BUILD_ALWAYS option is explicitly designed for that:
Just to permit users that want to set BUILD_ALWAYS to OFF, the option is now also exposed by YCMEPHelper, but its default value there is ON, while the default value of BUILD_ALWAYS in ExternalProject is OFF.