The target is tolua++, which has a source file ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c, yet this file is the output of the custom command that uses tolua++ to produce the output (though CMake is not actually told that tolua++ is a dependency of the generated file).
I may be misunderstanding something, but it seems to me that this produces an implicit circular dependency:
https://github.com/u3d-community/U3D/blob/eefc929633624a38840a421efa26347a80b967b3/Source/ThirdParty/toluapp/src/bin/CMakeLists.txt#L46-L62
The target is tolua++, which has a source file
${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c
, yet this file is the output of the custom command that usestolua++
to produce the output (though CMake is not actually told that tolua++ is a dependency of the generated file).