forked from BVLC/caffe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added gflags + bugfixes + rebase on bvlc/caffe
* added gflags requirement in CMake * fixed a bug that linked some tests into caffe lib * renamed tools/caffe due to conflicting target names with caffe lib * rebased onto bvlc/caffe
- Loading branch information
1 parent
f2f3b4c
commit 9f9b013
Showing
6 changed files
with
69 additions
and
14 deletions.
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,48 @@ | ||
# - Try to find GFLAGS | ||
# | ||
# The following variables are optionally searched for defaults | ||
# GFLAGS_ROOT_DIR: Base directory where all GFLAGS components are found | ||
# | ||
# The following are set after configuration is done: | ||
# GFLAGS_FOUND | ||
# GFLAGS_INCLUDE_DIRS | ||
# GFLAGS_LIBRARIES | ||
# GFLAGS_LIBRARYRARY_DIRS | ||
|
||
include(FindPackageHandleStandardArgs) | ||
|
||
set(GFLAGS_ROOT_DIR "" CACHE PATH "Folder contains Gflags") | ||
|
||
# We are testing only a couple of files in the include directories | ||
if(WIN32) | ||
find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h | ||
PATHS ${GFLAGS_ROOT_DIR}/src/windows) | ||
else() | ||
find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h | ||
PATHS ${GFLAGS_ROOT_DIR}) | ||
endif() | ||
|
||
if(MSVC) | ||
find_library(GFLAGS_LIBRARY_RELEASE | ||
NAMES libgflags | ||
PATHS ${GFLAGS_ROOT_DIR} | ||
PATH_SUFFIXES Release) | ||
|
||
find_library(GFLAGS_LIBRARY_DEBUG | ||
NAMES libgflags-debug | ||
PATHS ${GFLAGS_ROOT_DIR} | ||
PATH_SUFFIXES Debug) | ||
|
||
set(GFLAGS_LIBRARY optimized ${GFLAGS_LIBRARY_RELEASE} debug ${GFLAGS_LIBRARY_DEBUG}) | ||
else() | ||
find_library(GFLAGS_LIBRARY gflags) | ||
endif() | ||
|
||
find_package_handle_standard_args(GFLAGS DEFAULT_MSG | ||
GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY) | ||
|
||
|
||
if(GFLAGS_FOUND) | ||
set(GFLAGS_INCLUDE_DIRS ${GFLAGS_INCLUDE_DIR}) | ||
set(GFLAGS_LIBRARIES ${GFLAGS_LIBRARY}) | ||
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
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
File renamed without changes.