-
Notifications
You must be signed in to change notification settings - Fork 63
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
Bug/allow rebuilds with scikit build #645
base: branch-24.03
Are you sure you want to change the base?
Bug/allow rebuilds with scikit build #645
Conversation
Avoids errors when `legate_add_cpp_subdirectory` found a local version and therefore the python targets can't be added since they already exist
Consider a project that looks like: ``` legate_add_cpp_subdirectory(cpp TARGET legate_user EXPORT legate_user-export) legate_default_python_install(legate_user EXPORT legate_user-export) ``` If invoked from an env that already has `legate_user` already installed we can't rebuild from source since we implicitly call `find_package(legate_user)` due to being in a scikit-build env.
@robertmaynard You mean the
I don't think we would ever want that find package to find an installed version. Should I just restrict the find package call to only look in the build tree? I forget what the option is. |
Yes you are finding the installed version, yes I don't recommend naively using the build directory to find the exact package you are building. For example if the user is building and editing the project. After the second execution of CMake they will now find the build directory copy of the project, and won't be able to build it anymore. |
Currently due to the implicit logic around
SKBUILD
it isn't possible for projects to safely build/install multiple times in a row.Consider a project that looks like:
When a local user runs scikit-build the first time everything will work correctly as
legate_user
doesn't exist in the install location. But when invoked a second time it will find the installed version, and not build. So to install an updated versionof the files you need to first clean your env which is not a nice pattern.
So with the PR, projects can explicitly state they always want to build from source and never search for a local version.