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

Improve the buildsystem #715

Closed
asarubbo opened this issue May 31, 2017 · 9 comments
Closed

Improve the buildsystem #715

asarubbo opened this issue May 31, 2017 · 9 comments

Comments

@asarubbo
Copy link

At this point, we have multiple choice to what we want to install through zstd, for example:
thread support, lz4 support, xz support, gzip support, pzstd support and so on.

I guess that the best way to handle those supports is via a build system which provides a script that accepts configure options (autotools-based, cmake, etc).

Yes, I saw there is a cmake support, but it can be improved using a CMakeLists.txt file and have a flag for each thing we want to build or not.

It would also help downstream packagers.
Thanks.

@asarubbo
Copy link
Author

To explain a bit better:

I'd expect to have a configure, that launched ad ./configure --help prints all support I can enable, so, then I can do:

./configure --enable-lz4 --disable-xz --disable-static

and not dig into the makefile and analyze dozens of targets

@Cyan4973
Copy link
Contributor

Cyan4973 commented May 31, 2017

That's a good point @asarubbo .
Btw, we happily accept PR to improve the cmake build script.

@terrelln
Copy link
Contributor

I agree that we need a configure script. I'll put it on my queue.

@tesuji
Copy link
Contributor

tesuji commented Nov 28, 2018

@asarubbo Now we have meson build which support configure. Follow instructions in build/meson.

@LeeYoung624
Copy link
Contributor

LeeYoung624 commented May 17, 2019

Hey @asarubbo @Cyan4973 .
As @lzutao said, zstd have meson support with these options:
backtrace
build_contrib
build_programs
build_tests
debug_level
legacy_level
lz4
lzma
multi_thread
static_runtime
zlib

And I noticed that the build/cmake/CMakeLists.txt already has cmake option for multi thread and something else, and build/cmake/programs/CMakeLists.txt has cmake options for zlib and lzma:
option(ZSTD_LEGACY_SUPPORT "LEGACY SUPPORT" OFF)
option(ZSTD_BUILD_PROGRAMS "BUILD PROGRAMS" ON)
option(ZSTD_BUILD_CONTRIB "BUILD CONTRIB" OFF)
option(ZSTD_BUILD_TESTS "BUILD TESTS" OFF)
option(ZSTD_MULTITHREAD_SUPPORT "MULTITHREADING SUPPORT" ON)
option(ZSTD_ZLIB_SUPPORT "ZLIB SUPPORT" OFF)
option(ZSTD_LZMA_SUPPORT "LZMA SUPPORT" OFF).
These cmake options can be listed and configured like
cmake -LH
cmake -DZSTD_BUILD_TESTS=ON .

But it seems that the cmake scripts lack some options:
ZSTD_LZ4_SUPPORT
ZSTD_DEBUG_LEVEL
And the cmake instructions can be provided for guys not familiar with cmake.
Maybe I can improve the cmake build scripts. What do you think @Cyan4973 ?

@Cyan4973
Copy link
Contributor

Do you want to update the cmake script with these additional options ?

@LeeYoung624
Copy link
Contributor

Yes. And I want to improve the README.md in build/cmake to give some guides for users not familiar with cmake. Is it OK?

@Cyan4973
Copy link
Contributor

Sure !

@Cyan4973
Copy link
Contributor

cmake script was improved LeeYoung624,
but there is still no ./configure script.
That being said, does the project need one ? for which purpose ?

@terrelln , is that still an opened direction ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants