Skip to content

Conversation

@gdsotirov
Copy link

It's necessary to add ${GTEST_BOTH_LIBRARIES} for link target snappy-unittest to avoid errors about missing GTest symbols. Also I'm not sure why FUND_PACKAGE for GTest and Gflags is with option QUIET, because it's better to know if anything is missing.

It's necessary to add ${GTEST_BOTH_LIBRARIES} for link target snappy-unittest to avoid errors about missing GTest symbols. Also I'm not sure why FUND_PACKAGE for GTest and Gflags is with option QUIET, because it's better to know if anything is missing.
@pwnall
Copy link
Member

pwnall commented Jul 31, 2017

The QUIET issue is separate from the PR's title, and its main goal. Please fork it off to a separate PR, if you think it's worth pursuing. While I'm not the sole maintainer here, I'm opposed to removing QUIET, because snappy builds just fine without googletest. In fact, that's how we're currently testing it on Travis / AppVeyor.

@gdsotirov
Copy link
Author

OK, I returned back QUIET in 7f61e75, but I still think it shouldn't be so if target snappy-unittest that is build by default requires it.

@pwnall
Copy link
Member

pwnall commented Jul 31, 2017

snappy-unittest does not currently require googletest. It has its own stubs, which are used in case googletest is not found. As I've mentioned above, the CI builds do not install googletest or gflags. (feel free to look at .appveyor.yml and .travis.yml to verify this claim)

@gdsotirov
Copy link
Author

I trust you of course, but adding the variable is something needed for building snappy under Linux. Even I build only snappy library, then trying to install fails, because it tries to build snappy-unittest as well. Perhaps snappy-unittest should not be build by default?

@pwnall
Copy link
Member

pwnall commented Jul 31, 2017

How are you building snappy on Linux?

This is what we run on CI: cmake .. && cmake --build .

If you'd like to avoid building the unit tests (even though they should build just fine), cmake .. -DSNAPPY_BUILD_TESTS=0 && cmake --build .

@gdsotirov
Copy link
Author

I simply do the following:

cmake -LAH \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=TRUE \
..
make -j4
make DESTDIR=<somedir> install

but OK, I'll add -DSNAPPY_BUILD_TESTS=0 from now on :-)

@gdsotirov gdsotirov closed this Jul 31, 2017
@gdsotirov gdsotirov mentioned this pull request Aug 2, 2017
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.

2 participants