-
Notifications
You must be signed in to change notification settings - Fork 131
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 SLEEF_BUILD_SHARED_LIBS to override BUILD_SHARED_LIBS from including projects #531
Conversation
Also uses the standard version variables. Replaced PATCHLEVEL by PATCH except in #define'd macros (to preserve API). Replaced languages list with enable_language. Removed policy options that do not affect runtime (because they are enabled by the minimum version, anyway)
You need add |
Install dummy will always install sleef binaries into I double checked it, your current code seems right. I will vaildate your PR later, and let you known the status. @alexreinking |
Sounds good! Let me know how it goes. |
|
@alexreinking your PR can pass pytorch PreCI also. |
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.
Thanks, really happy with this solution. Just left 1 nitty comment.
Brilliant, thanks! It sounds like we set ourselves for some troubles by not keeping cmake tidy. Just left 1 nitty comment, otherwise happy to merge. |
Please merge it ASAP. Thanks. |
@xuhancn - It's in! |
@blapie - you're welcome! I'm always happy to help open source projects with their build systems 🙂 |
Cool, I will update pytorch to latest sleef master. |
It seems that this have disabled the generation of libsleef.so and libsleefquad.so symlinks making it harder to find/link to the library. Is this intentional? |
It was not intentional. The removal of the dummy targets was done in #510. I shouldn't have assumed this change was thoroughly tested before cherry picking it blindly. Thank you for your follow up PR fixing it properly for CMake 3.18. |
This PR contains three contributions in corresponding commits:
cmake_minimum_required
andproject
to maintain compatibility with future CMake versions.SLEEF_BUILD_SHARED_LIBS
variable which overrides the value ofBUILD_SHARED_LIBS
within SLEEF's project scope when used as a submodule.Parts (2-3) are meant to supersede #510.
ATTN @blapie @xuhancn