xiaolu / lz4

Automatically exported from code.google.com/p/lz4
1 stars 1 forks source link

[PATCH] Fix several issues with the CMake build #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- Don't set the value of BUILD_SHARED_LIBS
BUILD_SHARED_LIBS is a built-in CMake variable, usually expected to be set by 
the user. It tells CMake whether libraries should be shared or static.
Instead, we use our own BUILD_LIBS option to decide whether we want to build 
the libraries or not.

- Name executable file lz4, regardless of target architecture.
This is how the Makefile does it, this is what the users expect the tool to be 
named.

- Allow separate building of tools and libraries
The user can choose to build just the tools, just the libraries, or both.
Building just the libraries can be useful for development packages. For 
example, I use it for my mingw-w64 cross compiled lz4 package.

- Various simplifications

Original issue reported on code.google.com by radiants...@gmail.com on 6 Dec 2013 at 10:20

Attachments:

GoogleCodeExporter commented 9 years ago
You might also be interested in reading 
https://bugs.archlinux.org/task/37852?project=5&cat%5B0%5D=33&string=lz4 for 
background.

Original comment by radiants...@gmail.com on 6 Dec 2013 at 10:22

GoogleCodeExporter commented 9 years ago
It's a great improvement to LZ4 cmake.
It will be part of the next release of LZ4.

Original comment by yann.col...@gmail.com on 22 Dec 2013 at 4:24

GoogleCodeExporter commented 9 years ago
The following attached file is a release candidate of LZ4
integrating your cmake patch.
A few more modifications have also been integrated.

I've tested it, but I am unable to tell if it works as intended.
At least, the tool creation part (lz4, lz4c) works as intended.
But the library part if more obscure to me.

Could you please check if it works as you intended ?

Regards

Original comment by yann.col...@gmail.com on 23 Dec 2013 at 12:17

Attachments:

GoogleCodeExporter commented 9 years ago
I checked it out, it builds both the tools and the library as intended.

Original comment by radiants...@gmail.com on 24 Dec 2013 at 12:29

GoogleCodeExporter commented 9 years ago
Yann could you use only one build system? I know you use and maintain the 
makefile in the root directory.

You have another request to switch to autotools, in the bug report.

It will be simpler for everyone, if you decide which is lz4 build system and we 
all rely on the same. I already have request (on archlinux) to use the cmake 
build system to build the binary and the library (not doable on the root 
makefile).

Original comment by sebastien.luttringer on 24 Dec 2013 at 6:53

GoogleCodeExporter commented 9 years ago
OK.

The cmake file is provided because several users have expressed a need for it. 
However it only evolve thanks to external contributions (such as the excellent 
one in this thread). At this stage, I cannot commit to maintain it.

Point is, the official build system is the Makefile at root.
That's the only one I can maintain.
So, if one must be "official", it will be the root makefile.

I don't believe it's a good idea to "remove" the cmake file though. After all, 
it sits into its own directory, and doesn't impact the other files. I could 
rename the directory, call it "cmake unofficial" or something like that if it 
does help clarity.

Original comment by yann.col...@gmail.com on 24 Dec 2013 at 10:35

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Implemented into r110

Original comment by yann.col...@gmail.com on 30 Dec 2013 at 5:23