I use External Modules in YARP configured using <YARP_ROOT>/conf/ExternalModules.cmake.
I have multiple external modules, and when I generate a solution for Visual Studio, CMake returns this error:
CMake Warning (dev) at src/modules/CMakeLists.txt:62 (add_subdirectory):
Policy CMP0013 is not set: Duplicate binary directories are not allowed.
Run "cmake --help-policy CMP0013" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The binary directory
is already used to build a source directory. This command uses it to build
which can generate conflicting build files. CMake does not support this
use case but it used to work accidentally and is being allowed for
This warning is for project developers. Use -Wno-dev to suppress it.
I looked into <YARP_ROOT>/src/modules/CMakeLists.txt : 62 and replaced it with:
It seems to me that CMake is putting all external modules into the same directory, and this workaround solved my problem.
Is this a bug?