-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add CMake build rules for (some) of the generator jit tests #7693
base: main
Are you sure you want to change the base?
Conversation
Amazingly, these have been TODO for ~ever. This adds two of them; registration_test and rungen_test will be added subsequently (assuming this PR works).
Monday morning review ping |
Monday morning review ping, again |
Pingity ping ping ping |
♫ Old McDonald had a ping |
Re-adding @alexreinking -- the reason that Ugly options:
|
Post-vacation ping to @alexreinking |
Bride of Return of Ping to @alexreinking |
There's a nice...ish... way to do this in CMake 3.27 (latest) that I outlined in the review suggestions. You create an interface library that propagates the links / includes and object files (filtering out GenGen.cpp.o is 3.27+). For now, I'd prefer to preserve existing usage since an eventual upgrade to CMake will allow us to do that anyway. Maybe only build redundantly if the cpp stubs are requested via the argument? |
This already exists as
I think this is the way to go given our current CMake version. |
Co-authored-by: Alex Reinking <alex.reinking@gmail.com>
Co-authored-by: Alex Reinking <alex.reinking@gmail.com>
…Halide into srj/cmake-jit-generators
Wow, I had forgotten about this PR. Will your upcoming CMake upgrade make any of this easier? (or at least less-bad) |
We should really clean this up and land it (otherwise we aren't getting all of our tests built + tested under CMake); what are the sticking points? |
I think I'm happy with this after removing the |
Co-authored-by: Alex Reinking <areinking@adobe.com>
cmake/HalideGeneratorHelpers.cmake
Outdated
@@ -93,8 +93,15 @@ function(add_halide_generator TARGET) | |||
# TODO: what do we need to do for PACKAGE_NAME PACKAGE_NAMESPACE EXPORT_FILE in this case? | |||
else () | |||
add_executable(${TARGET} ${ARG_SOURCES}) | |||
target_link_libraries("${TARGET}" PRIVATE Halide::Generator ${ARG_LINK_LIBRARIES}) | |||
target_include_directories("${TARGET}" PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QQ: why is this needed? Which files do they access?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point, I don't remember. I'll remove it and see what breaks :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The target_include_directories is apparently unnecessary, removing
@alexreinking I'm not sure how to resolve the conflicts here to land this, can you take a quick look? |
Amazingly, these have been TODO for ~ever. This adds two of them; registration_test and rungen_test will be added subsequently (assuming this PR works).