Skip to content
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

Making fixed paths in dependency target optional #259

Closed
wants to merge 6 commits into from
Closed

Making fixed paths in dependency target optional #259

wants to merge 6 commits into from

Conversation

tdegeus
Copy link
Collaborator

@tdegeus tdegeus commented Dec 11, 2019

No description provided.

Copy link
Contributor

@ferdonline ferdonline left a comment

Choose a reason for hiding this comment

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

Thanks for the suggestion @tdegeus.
I added a few comments on things that I think can be improved.
One thing, please don't reformat the whole file, it makes it hard to track, and we have in this project the convention of 2 spaces and using

command(PROPERTY val PROPX val2)  # Fits small line

command(PROPERTY val1
        PROPERTY val2)
or 
command(MODE
   PROPERTY
       val1
       val2
)

if(NOT DEFINED HIGHFIVE_PARALLEL_HDF5)
option(HIGHFIVE_PARALLEL_HDF5 "Enable Parallel HDF5 support" @HIGHFIVE_PARALLEL_HDF5@)
set(HIGHFIVE_PARALLEL_HDF5 @HIGHFIVE_PARALLEL_HDF5@)
Copy link
Contributor

Choose a reason for hiding this comment

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

why not providing target project with options? Users would appreciate I believe

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is unclear to me how one can ever reach these options. Can you given and example CMakeLists.txt where you reach them?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In terms of the command-line options, yes is should be there, but only HighFive's CMakeLists.txt. Which I think it is, but we should double check.

CMake/HighFiveTargetDeps.cmake Outdated Show resolved Hide resolved
CMake/HighFiveConfig.cmake.in Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMake/HighFiveTargetExport.cmake Outdated Show resolved Hide resolved
@tdegeus
Copy link
Collaborator Author

tdegeus commented Dec 11, 2019

I will revert the indentation. Though since the entire project is four space, I think it should be four spaces also here.

Copy link
Collaborator Author

@tdegeus tdegeus left a comment

Choose a reason for hiding this comment

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

@ferdonline Can you check/comment if things are to your likings now.

@tdegeus
Copy link
Collaborator Author

tdegeus commented Dec 12, 2019

I just realised that the static target is inherently restricted to old CMake behaviour. In particular, the static target will only work for those libraries that do not provide modern CMake targets. Those that do, will always require to call find_package(ModernLibrary) before using the target. I.e. the new way of doing things in CMake is exactly to get rid of static dependencies including the possibility to dirty hack them in, as we just did. I guess that the only way to keep dirty hacking it in is to hard-copy all the targets' components, but this seems at odds with the direction that CMake is purposefully moving to.

The static dependencies should therefore be removed from HighFive altogether. Thereto I see the following options:

  • The static dependencies are removed all-together from this commit forward.
  • That HIGHFIVE_USE_INSTALL_DEPS option is only introduced to ease the transition, but directly accompanied by a deprecation warning. If this option is chosen, we should remove the modern Boost targets.

@tdegeus
Copy link
Collaborator Author

tdegeus commented Dec 12, 2019

I have pushed a proposal for how I think the user can still provided with everything there was before, but the user is not automatically invited to keep using old features and warned that these features will disappear in the future.

Curious to hear your feedback.

@ferdonline
Copy link
Contributor

Tom I appreciate your contribution here but, although you solution seeks to be more elegant, it ends up being more complex and introducing limitations. The limitations being that it doesnt seem to perfectly work with the older systems, and second when we default to not use the detected libs they wont be exported and so, even if the end application wants to change the default and actually use them, it's not possible anymore.
With that in mind I think we should favour the initial solution.
Please let me know of eventual limitations or cases we must still work out.

@tdegeus
Copy link
Collaborator Author

tdegeus commented Dec 23, 2019

@ferdonline With this things should be how you like them.

@tdegeus
Copy link
Collaborator Author

tdegeus commented Jan 9, 2020

Any news @ferdonline ?

@tdegeus tdegeus closed this Jan 11, 2020
@tdegeus tdegeus deleted the patch branch January 21, 2020 08:07
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.

None yet

2 participants