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

CMake: Use helper libraries for nczarr tests #2783

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

ZedThree
Copy link
Contributor

Avoids rebuilding the same files multiple times. This cuts down on duplicated warnings, and gives a little bit of a speedup to the build (~5-10%)

@DennisHeimbigner
Copy link
Collaborator

I am surprised the speed up is as much as you say. IMO the files are not very big.

Avoids rebuilding the same files multiple times
@ZedThree
Copy link
Contributor Author

Yes, me too! I suspect it's actually mostly from not printing the warnings many times rather than a significant build speed up

WardF
WardF previously approved these changes Oct 27, 2023
@WardF
Copy link
Member

WardF commented Oct 27, 2023

Great change, thanks! I'm working through all these great PR's we've seen. As backlogs go, I'm happier to have these improvements than not. Thanks!

-Ward

@WardF
Copy link
Member

WardF commented Oct 27, 2023

There does appear to be an issue under Visual Studio, but I'll take a look at that and push a fix if required.

@WardF
Copy link
Member

WardF commented Nov 1, 2023

The import/export mechanic required by dynamic shared libraries on Windows is complicating this a fair bit; the common helper library mechanism introduced is (as exists in the PR) insufficient, insofar as there are unresolved symbols when linking via Visual Studio.

I believe I have a fix, or have at the very least will have replaced these issues with other, new ones. I'll have something in soon.

@ZedThree
Copy link
Contributor Author

ZedThree commented Nov 1, 2023

Ah, didn't even think about that! Would making it STATIC help? Or failing that, is there a flag to export all symbols?

@WardF
Copy link
Member

WardF commented Nov 1, 2023

Setting STATIC is the fix I'm testing now, although I had to tweak a couple other minor things. This is why we have the Windows CI at least :). Adding STATIC has fixed the issue reported, I'm running through the compile/run test loop locally now, then I'll make sure I haven't introduced anything strange/unexpected under Linux.

@WardF
Copy link
Member

WardF commented Nov 1, 2023

There was also some fiddling with setting -DDLL_NETCDF and -DDLL_EXPORT as needed; nothing major, just the fiddly cross-platform bits that we (the Unidata folk) are obliged to worry about so that others can... worry less about it XD. Thanks though, hopefully this will get merged in short order.

@WardF
Copy link
Member

WardF commented Nov 1, 2023

Speaking of, thanks for this and all the other PR's you've put up recently. They'll all have to be looked at under similar lenses, and I know it's taking a bit of time to get to them, but they're sitting there staring at me where I can't accidentally forget about them XD. Lots to do, I'm sure you understand.

@ZedThree
Copy link
Contributor Author

ZedThree commented Nov 1, 2023

Speaking of, thanks for this and all the other PR's you've put up recently. They'll all have to be looked at under similar lenses, and I know it's taking a bit of time to get to them, but they're sitting there staring at me where I can't accidentally forget about them XD. Lots to do, I'm sure you understand.

Yep, no worries -- netCDF is pretty crucial in our field, so I appreciate all your work, and I'm just happy to be able to give something back! As a heads up, I'm intending to get netCDF to zero warnings over the next month or so, so there are more PRs incoming I'm afraid! I figured you would rather lots of smaller PRs than one big enormous one 😄

@WardF
Copy link
Member

WardF commented Nov 1, 2023

Sounds good; just bear in mind we support Windows (Visual Studio), 32-bit and 64-bit hardware, and Big Endian machines as well as Little. All that is to say, sometimes the warnings are a bit trickier than they initially appear :).

@WardF WardF merged commit 3385be8 into Unidata:main Nov 17, 2023
98 of 99 checks passed
@ZedThree ZedThree deleted the nczarr-tests-common-library branch January 29, 2024 11:15
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