Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular dependency in tolua++ bin #28

Open
SirNate0 opened this issue Dec 6, 2022 · 0 comments
Open

Circular dependency in tolua++ bin #28

SirNate0 opened this issue Dec 6, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@SirNate0
Copy link
Collaborator

SirNate0 commented Dec 6, 2022

I may be misunderstanding something, but it seems to me that this produces an implicit circular dependency:

# Define target name
set (TARGET_NAME tolua++)
# Define generated source files
if (URHO3D_UPDATE_SOURCE_TREE)
set (UPDATE_COMMAND COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c ${CMAKE_CURRENT_SOURCE_DIR}/toluabind.c)
endif ()
file (GLOB TOLUA lua/*.lua)
add_custom_command (OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c
COMMAND ${CMAKE_BINARY_DIR}/bin/tool/tolua++ -o ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c -H ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.h -n tolua tolua_scons.pkg 2>${NULL_DEVICE} || ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/toluabind.c ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c
${UPDATE_COMMAND}
DEPENDS ${TOLUA} tolua_scons.pkg
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating toluabind.c and toluabind.h")
# Define source files
define_source_files (EXTRA_CPP_FILES tolua.c ${CMAKE_CURRENT_BINARY_DIR}/generated/toluabind.c)

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).

@klaussilveira klaussilveira added the bug Something isn't working label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants