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

Only build user requested set of containers? #62

Open
ZedThree opened this issue Apr 3, 2023 · 2 comments
Open

Only build user requested set of containers? #62

ZedThree opened this issue Apr 3, 2023 · 2 comments

Comments

@ZedThree
Copy link
Collaborator

ZedThree commented Apr 3, 2023

Currently, building downstream consumers of gFTL-shared such as pFUnit requires building all versions of all containers. It would be very nice if users could build only the set that they need. This would massively speed up builds.

I think this would be pretty easy to achieve. As well as adding each container to the gftl-shared library here:

target_sources (${v2-default} PRIVATE vector/${T}${Container}_wrap.F90)

also make a new target just for that container:

add_library(${T}_${Container} vector/${T}${Container}_wrap.F90)

Then users could link against GTL_SHARED::String_Vector for example, and only build what they require.

@tclune
Copy link
Member

tclune commented Apr 3, 2023

I am not opposed. But this will unfortunately not help much for those that build gFTL-shared as a separate library. In that vein some CMake options to down select container categories and or template type parameters could help as well.

I'm presuming we won't hit some scaling issue with CMake by having so many targets?

Will you do the PR? (For your idea - not my follow on suggestion.)

@ZedThree
Copy link
Collaborator Author

ZedThree commented Apr 3, 2023

That is true. I could imagine it would also add some pain during development if types change, or if the user can choose between single/double precision reals for instance. I'm not sure what a good interface would look like for that.

Sure, I'll try to get to it today if I can

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

No branches or pull requests

2 participants