Currently, CMake build sets up SHARED_LIBRARY_OUTPUT_NAME based on LIBRARY_BASE_NAME, LIBVER_* and architecture. It is proposed that user could override SHARED_LIBRARY_OUTPUT_NAME with her setting, allowing to build shared library as e.g. "zstdlib.dll".
Sounds like a reasonable feature request to me.
My understanding of cmake is limited, I would gladly accept a PR for this feature.
So is mine :-) but I think the attached patch does the job.
Thanks ! Your patch has been included in cmake script
It is broken again in the latest release :-(
Seemingly, after commit https://github.com/facebook/zstd/commit/e87cad1053e5a50ce280bd346b016fe294b64605
We test the cmake build script in the CI, but since it was broken we aren't testing this. Is there a way we can test this functionality in CI so it doesn't break again?
Indeed, since cmake script evolves from external requests and patch, overlapping or even conflicting objectives may fight to get in.
A few thoughts :
Hmm, are there automated tests for CMake options already in the CI? I presume their place would be either
https://github.com/facebook/zstd/blob/dev/.travis.yml or https://github.com/facebook/zstd/blob/dev/appveyor.yml ?
Yes :
For travis : https://github.com/facebook/zstd/blob/master/.travis.yml#L16
note : the tests in master are run on a nightly basis, instead of "at every push/modif"
For appveyor : https://github.com/facebook/zstd/blob/dev/appveyor.yml#L26
here also, run only on master
This policy can be changed, as need be.
We have a difficult balance to preserve between test completeness and feedback signal speed.
I fail to see the actual checks. Is it supposed that I add additional build rule, for which I specify some non-default shared library name (e.g. "zstdlib"), and a "test -f" check?
The point is more for contributors to add a test, typically in script format, that will check that a specific property is confirmed (in this case, that user can take control of SHARED_LIBRARY_OUTPUT_NAME).
We can take care of the part where this test is run automatically in CI.
Most helpful comment
Indeed, since
cmakescript evolves from external requests and patch, overlapping or even conflicting objectives may fight to get in.A few thoughts :