Skip to content

fix cmake export for 3rd party importers on linux/unix #45

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

Closed
wants to merge 2 commits into from

Conversation

robertu94
Copy link
Contributor

Previously, the installed include directory was not added to the PUBLIC interface of the installed library preventing users from using find_package(nvcomp); target_link_libraries(foo PRIVATE nvcomp::nvcomp) if the library was installed to a non-standard include location (i.e. with spack or ~/.local/include)

@eschmidt-nvidia
Copy link
Collaborator

Hi Robert. Thanks for the PR and sorry for the delayed response.

I've reviewed your PR and have a few questions (in the comments). Our plan right now is to incorporate your changes into our internal development branch for inclusion in our 2.2 release.

@@ -187,11 +187,11 @@ nvcompStatus_t nvcompBitcompCompressAsync(
return nvcompErrorInternal;
if (bitcompSetStream(handle, stream) != BITCOMP_SUCCESS)
return nvcompErrorInvalidValue;
if (bitcompCompressLossless(handle, in_ptr, out_ptr) != BITCOMP_SUCCESS)
if (bitcompCompressLossless(handle, in_ptr, (char*)out_ptr) != BITCOMP_SUCCESS)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function signature for bitcompCompressLossless takes in a void*. Why do you need the cast? This applies to the other cast changes as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember why I made this change. The best I can guess is that the output pointer was previously a char*, but I can't find it now in the few minutes that I have before my flight.

)
if(UNIX)
target_include_directories(nvcomp PUBLIC
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you confirm that this is your required change? The rest of the cmake changes are optional, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eschmidt-nvidia It's been a while since I wrote this patch so my memory is a bit foggy. As I recall, this isn't the only required change. Specifically, including GNUInstallDirs where it was previously included meant that some of the variables were not defined in the right place

The CMAKE_EXPORT_COMPILE_COMMANDS is optional, but enables some tooling.

@robertu94
Copy link
Contributor Author

@eschmidt-nvidia Thanks for looking at the patch. I think everyone has been busy. I am just glad you eventually got around to it 😄 .

@robertu94
Copy link
Contributor Author

@eschmidt-nvidia I just wanted to ping you after the holidays and check on the status of this.

@eschmidt-nvidia
Copy link
Collaborator

@eschmidt-nvidia I just wanted to ping you after the holidays and check on the status of this.

Hi Robert,

I’ve included this in an internal PR targeting 2.2. Plan is to include this in the 2.2 release later this month / early Feb. I’ll have a release candidate for you to try out by the end of the week.

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

This PR has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d if there is no activity in the next 60 days.

@robertu94
Copy link
Contributor Author

Just waiting for things to merge. Commenting to remove the stale tag.

@mnicely
Copy link
Collaborator

mnicely commented Feb 7, 2022

Included in v2.2

@mnicely mnicely closed this Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants