-
Notifications
You must be signed in to change notification settings - Fork 981
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
Allow building with cmake (to ease building on windows), version 2 #29
Conversation
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
@trondn, I can take over this pull request until it's merged but I would need you to agree to the Contributor License Agreeement. Is that ok with you ? |
Sure :) (I don't know why the CLA check failed.. I've singed the CLA earlier..) |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
ok, @trondn, the error was on my side, sorry. As asked by the bot, please confirm that you are ok with me committing what you authored, and we are good to go ! Thx ! |
Go for it :) |
CMakeLists.txt
Outdated
CHECK_LIBRARY_EXISTS(fastlz fastlz_compress "" HAVE_LIBFASTLZ) | ||
CHECK_LIBRARY_EXISTS(quicklz qlz_compress "" HAVE_LIBQUICKLZ) | ||
|
||
CHECK_CXX_SOURCE_COMPILES("int main(void) { return __builtin_expect(0, 1) ? 1 : 0; }" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't the following be enough:
CHECK_CXX_SOURCE_COMPILES("int main(void) { return __builtin_expect(0, 1); }" HAVE_BUILTIN_EXPECT)
CMakeLists.txt
Outdated
CHECK_CXX_SOURCE_COMPILES("int main(void) { return __builtin_expect(0, 1) ? 1 : 0; }" | ||
HAVE_BUILTIN_EXPECT) | ||
|
||
CHECK_CXX_SOURCE_COMPILES("int main(void) { return __builtin_ctzll(0) ? 1 : 0; }" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
CMakeLists.txt
Outdated
|
||
SET(SNAPPY_MAJOR 1) | ||
SET(SNAPPY_MINOR 1) | ||
SET(SNAPPY_PATCHLEVEL 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be PATCHLEVEL 4.
you can specify the version in the |
everything |
…n windows), version 2
also, the export set is currently kinda useless because it doesn’t export any targets (and this is basically what #16 (comment) was intended to be about) i’d also vote for using lower case for the CMake code I added proposed changes here https://github.com/Optiligence/snappy/tree/cmake |
(This allows for easier builds on Windows)
ae6f3d6
to
5188792
Compare
@Optiligence , I believe I took your comments into account in a new commit (except fro capitalization for now). I also added some older fixes that I had squashed in the older CMakeLists.txt commit (shouldn't have sorry). |
Several parts are different (missing, wrong), you can squash the commits from here https://github.com/Optiligence/snappy/tree/cmake_upper_case instead |
I was also thinking that the output name should contain the ABI version, as it currently does with autotools. |
523dc27
to
cf1aad0
Compare
8145ab6
to
9b8e53a
Compare
CMakeLists.txt
Outdated
CHECK_INCLUDE_FILES("string.h" HAVE_STRING_H) | ||
CHECK_INCLUDE_FILES("sys/byteswap.h" HAVE_SYS_BYTESWAP_H) | ||
CHECK_INCLUDE_FILES("sys/endian.h" HAVE_SYS_ENDIAN_H) | ||
CHECK_INCLUDE_FILES("stdint.h" HAVE_STDINT_H) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate from line 24
We need CMake 3.4 which is not in 14.04 hence the jump to 16.04.
Any updates here / anything others can do to help? We would love to put up a Snappy windows build on https://github.com/conda-forge/snappy-feedstock |
Yes we are making progress. We should have arelease with cmake soon, plus
continuous integration.
On Apr 18, 2017 21:23, "Wes McKinney" <notifications@github.com> wrote:
Any updates here / anything others can do to help? We would love to put up
a Snappy windows build on https://github.com/conda-forge/snappy-feedstock
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#29 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAQO_bq7jxNyZ048ecAAdm9Ch1nQKA8Uks5rxQ2lgaJpZM4MNGTE>
.
|
Please add CMake option to build tests https://gist.github.com/KindDragon/b8752d22541a6d9d488e066b6a93a853#file-snappycmakelists-txt-L113 |
I am closing this PR since we have submitted CMake internally and it will be part of the next release. |
This lands google#29
This is a small rewrite of #16 , mostly to simplify the windows support and modify less code.