odb: Move messages checking to odb to fix deps.#5704
odb: Move messages checking to odb to fix deps.#5704maliberty merged 1 commit intoThe-OpenROAD-Project:masterfrom
Conversation
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
I assume this is to fix #5687 add_custom_target docs say
I think this should only run when there is a change to a dependency. Can this be accomplished with add_custom_command ? |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
You're right. PR updated as suggested. |
src/odb/CMakeLists.txt
Outdated
There was a problem hiding this comment.
What is the purpose of the touch command? That file doesn't seem to be referenced.
There was a problem hiding this comment.
This file is referenced by add_custom_target(odb_messages DEPENDS messages.txt). This file is in build/src/odb and is only generated when find_messages.py succeeds. This way invoking make will rerun find_messages.py if it's missing (ie find_message.py not run yet) or if a dependencies is changed.
The output of find_messages.py is in src/odb and is always generated whenever find_messages.py succeeds or not which is the current behaviour.
To test the patch I just do a "ls src/odb/messages.txt ../src/odd/messages.txt" from build folder to see how things are going on so I can see if the files are updated and when based on the date. Thins go as intented after testing in the different conditions.
There was a problem hiding this comment.
I've renamed the target file to messages_checked to avoid confusion.
The messages checking was set at db level as odb is an interface and doesn't not have a post-build trigger. Unfortunately there were no dependencies on other libs besides db such as defin. So since add_dependencies can only add targets but not files, create a custom target which depends on a generated files which triggers the call to find_messages.py. Signed-off-by: Christian Costa <titan.costa@gmail.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
The messages checking was set at db level as odb is an interface and doesn't not have a post-build trigger.
Unfortunately there were no dependencies on other libs besides db such as defin.
So since add_dependencies can only add targets but not files, create a custom target which depends on a generated files which
triggers the call to find_messages.py.