-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
cmake: do not build tests for Release build and cleanups #5916
Closed
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
227cdd4
cmake: disable WITH_TESTS for Release builds
tchaikov 7d1de89
cmake: compile testharness as a static library
tchaikov 9e33443
cmake: use CMAKE_DEPENDENT_OPTION() to conditionalize option definition
tchaikov 3d65227
cmake: add benchmark tools without a loop
tchaikov 49d3a25
cmake: remove alias variables
tchaikov a0599be
cmake: simplify db/c_test.c build
tchaikov b77534d
cmake: default to Debug
tchaikov 2117e9a
cmake: add Findgflags.cmake
tchaikov a9b5366
cmake: require gflags if WITH_GFLAGS
tchaikov 5492027
.travis.yml: disable WITH_GFLAGS for cmake-mingw
tchaikov f8cd930
.travis.yml: install gflags on osx
tchaikov 04f3573
db_stress: silence clang++ warning
tchaikov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# - Find gflags library | ||
# Find the gflags includes and library | ||
# | ||
# gflags_INCLUDE_DIR - where to find gflags.h. | ||
# gflags_LIBRARIES - List of libraries when using gflags. | ||
# gflags_FOUND - True if gflags found. | ||
|
||
find_path(GFLAGS_INCLUDE_DIR | ||
NAMES gflags/gflags.h) | ||
|
||
find_library(GFLAGS_LIBRARIES | ||
NAMES gflags) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(gflags | ||
DEFAULT_MSG GFLAGS_LIBRARIES GFLAGS_INCLUDE_DIR) | ||
|
||
mark_as_advanced( | ||
GFLAGS_LIBRARIES | ||
GFLAGS_INCLUDE_DIR) | ||
|
||
if(gflags_FOUND AND NOT (TARGET gflags::gflags)) | ||
add_library(gflags::gflags UNKNOWN IMPORTED) | ||
set_target_properties(gflags::gflags | ||
PROPERTIES | ||
IMPORTED_LOCATION ${GFLAGS_LIBRARIES} | ||
INTERFACE_INCLUDE_DIRECTORIES ${GFLAGS_INCLUDE_DIR} | ||
IMPORTED_LINK_INTERFACE_LANGUAGES "CXX") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm a little bit confused why it can still build after removing this file.
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.
my bad, added
db_bench_tool.cc
back . the reason it built is that gflags is not found by cmake as neither do we haveFindgflags.cmake
nor{gflagsConfig,gflags-config}.cmake
in the (ancient) xenial CI node created by travis.i added
Findgflags.cmake
to address this issue in this PR.