Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gflags
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
gflags
Commits
9a257c0b
Commit
9a257c0b
authored
Mar 30, 2014
by
Andreas Schuh
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'google/develop' into release
parents
2a9ef084
94c23575
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
33 deletions
+54
-33
CMakeLists.txt
CMakeLists.txt
+36
-14
NEWS.txt
NEWS.txt
+9
-8
README.txt
README.txt
+0
-2
utils.cmake
cmake/utils.cmake
+6
-6
gflags_declare.h.in
src/gflags_declare.h.in
+3
-3
No files found.
CMakeLists.txt
View file @
9a257c0b
...
...
@@ -24,7 +24,15 @@ version_numbers (
# ----------------------------------------------------------------------------
# options
set
(
GFLAGS_NAMESPACE
"
${
PACKAGE_NAME
}
"
CACHE STRING
"C++ namespace identifier of gflags library."
)
set
(
GFLAGS_NAMESPACE
"
${
PACKAGE_NAME
}
"
CACHE STRING
"C++ namespace identifier of gflags library."
)
set
(
GFLAGS_INCLUDE_DIR
"
${
PACKAGE_NAME
}
"
CACHE STRING
"Include subdirectory of gflags header files."
)
if
(
IS_ABSOLUTE GFLAGS_INCLUDE_DIR
)
message
(
FATAL_ERROR
"GFLAGS_INCLUDE_DIR must be a path relative to CMAKE_INSTALL_PREFIX/include"
)
endif
()
if
(
GFLAGS_INCLUDE_DIR MATCHES
"^
\\
.
\\
.[/
\\
]"
)
message
(
FATAL_ERROR
"GFLAGS_INCLUDE_DIR must not start with parent directory reference (../)"
)
endif
()
option
(
BUILD_SHARED_LIBS
"Request build of shared libraries."
OFF
)
option
(
BUILD_STATIC_LIBS
"Request build of static libraries (default if BUILD_SHARED_LIBS is OFF)."
OFF
)
...
...
@@ -38,6 +46,7 @@ option (INSTALL_HEADERS "Request packaging of headers and other devel
mark_as_advanced
(
CLEAR CMAKE_INSTALL_PREFIX
)
mark_as_advanced
(
CMAKE_CONFIGURATION_TYPES
GFLAGS_NAMESPACE
GFLAGS_INCLUDE_DIR
BUILD_STATIC_LIBS
BUILD_NC_TESTS
INSTALL_HEADERS
)
...
...
@@ -197,13 +206,22 @@ else ()
set
(
GFLAGS_ATTRIBUTE_UNUSED
)
endif
()
# whenever we build a shared library (DLL on Windows), configure the public
# headers of the API for use of this library rather than the optionally
# also build statically linked library; users can override GFLAGS_DLL_DECL
if
(
BUILD_SHARED_LIBS
)
set
(
GFLAGS_IS_A_DLL 1
)
else
()
set
(
GFLAGS_IS_A_DLL 0
)
endif
()
configure_headers
(
PUBLIC_HDRS
${
PUBLIC_HDRS
}
)
configure_sources
(
PRIVATE_HDRS
${
PRIVATE_HDRS
}
)
configure_sources
(
GFLAGS_SRCS
${
GFLAGS_SRCS
}
)
include_directories
(
"
${
PROJECT_SOURCE_DIR
}
/src"
)
include_directories
(
"
${
PROJECT_BINARY_DIR
}
/include"
)
include_directories
(
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
NAMESPACE
}
"
)
include_directories
(
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
INCLUDE_DIR
}
"
)
# ----------------------------------------------------------------------------
# output directories
...
...
@@ -273,7 +291,7 @@ configure_file (cmake/version.cmake.in "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-co
install
(
TARGETS
${
TARGETS
}
DESTINATION
${
LIBRARY_INSTALL_DIR
}
EXPORT gflags-lib
)
if
(
INSTALL_HEADERS
)
install
(
FILES
${
PUBLIC_HDRS
}
DESTINATION
${
INCLUDE_INSTALL_DIR
}
/
${
GFLAGS_
NAMESPACE
}
)
install
(
FILES
${
PUBLIC_HDRS
}
DESTINATION
${
INCLUDE_INSTALL_DIR
}
/
${
GFLAGS_
INCLUDE_DIR
}
)
install
(
FILES
"
${
PROJECT_BINARY_DIR
}
/
${
PACKAGE_NAME
}
-config-install.cmake"
RENAME
${
PACKAGE_NAME
}
-config.cmake
...
...
@@ -376,19 +394,23 @@ if (BUILD_PACKAGING)
set
(
CPACK_PACKAGE_ARCHITECTURE
)
else
()
string
(
TOLOWER
"
${
CMAKE_SYSTEM_NAME
}
"
CPACK_SYSTEM_NAME
)
execute_process
(
COMMAND dpkg --print-architecture
RESULT_VARIABLE RV
OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE
)
if
(
RV EQUAL 0
)
string
(
STRIP
"
${
CPACK_PACKAGE_ARCHITECTURE
}
"
CPACK_PACKAGE_ARCHITECTURE
)
if
(
CMAKE_CXX_FLAGS MATCHES
"-m32"
)
set
(
CPACK_PACKAGE_ARCHITECTURE i386
)
else
()
execute_process
(
COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE
)
if
(
CPACK_PACKAGE_ARCHITECTURE MATCHES
"x86_64"
)
set
(
CPACK_PACKAGE_ARCHITECTURE amd64
)
execute_process
(
COMMAND dpkg --print-architecture
RESULT_VARIABLE RV
OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE
)
if
(
RV EQUAL 0
)
string
(
STRIP
"
${
CPACK_PACKAGE_ARCHITECTURE
}
"
CPACK_PACKAGE_ARCHITECTURE
)
else
()
set
(
CPACK_PACKAGE_ARCHITECTURE i386
)
execute_process
(
COMMAND uname -m OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE
)
if
(
CPACK_PACKAGE_ARCHITECTURE MATCHES
"x86_64"
)
set
(
CPACK_PACKAGE_ARCHITECTURE amd64
)
else
()
set
(
CPACK_PACKAGE_ARCHITECTURE i386
)
endif
()
endif
()
endif
()
endif
()
...
...
NEWS.txt
View file @
9a257c0b
=== 20 March 2014 ===
I've just released gflags 2.1.
0.
I've just released gflags 2.1.
The major changes are the use of CMake for the build configuration instead
of the autotools and packaging support through CPack. This release compiles
with all major compilers without warnings and passed the unit tests on
Ubuntu 12.04, Windows 7 (Visual Studio 2008 and 2010, Cygwin, MinGW), and
Mac OS X (Xcode 5.1).
of the autotools and packaging support through CPack. The default namespace
of all C++ symbols is now "gflags" instead of "google". This can be
configured via the GFLAGS_NAMESPACE variable.
This release compiles with all major compilers without warnings and passed
the unit tests on Ubuntu 12.04, Windows 7 (Visual Studio 2008 and 2010,
Cygwin, MinGW), and Mac OS X (Xcode 5.1).
The SVN repository on Google Code is now frozen and replaced by a Git
repository such that it can be used as Git submodule by projects. The main
...
...
@@ -21,9 +24,7 @@ For the further development, I am following the
with feature branch names prefixed by "feature/" and bugfix branch names
prefixed by "bugfix/", respectively.
Binary and source distribution packages can be downloaded from
[https://github.com/schuhschuh/gflags GitHub] as Google Code no longer
permits the upload of such download packages.
Binary and source [https://github.com/schuhschuh/gflags/releases packages] are available on GitHub.
=== 14 January 2013 ===
...
...
README.txt
View file @
9a257c0b
...
...
@@ -2,5 +2,3 @@ This package contains a library that implements commandline flags
processing. As such it's a replacement for getopt(). It has increased
flexibility, including built-in support for C++ types like string, and
the ability to define flags in the source file in which they're used.
The devel package contains static and debug libraries and header files
for developing applications that use the gflags package.
cmake/utils.cmake
View file @
9a257c0b
...
...
@@ -47,11 +47,11 @@ function (configure_headers out)
set
(
tmp
)
foreach
(
src IN LISTS ARGN
)
if
(
EXISTS
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
.in"
)
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
.in"
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
NAMESPACE
}
/
${
src
}
"
@ONLY
)
list
(
APPEND tmp
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
NAMESPACE
}
/
${
src
}
"
)
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
.in"
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
INCLUDE_DIR
}
/
${
src
}
"
@ONLY
)
list
(
APPEND tmp
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
INCLUDE_DIR
}
/
${
src
}
"
)
else
()
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
"
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
NAMESPACE
}
/
${
src
}
"
COPYONLY
)
list
(
APPEND tmp
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
NAMESPACE
}
/
${
src
}
"
)
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
"
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
INCLUDE_DIR
}
/
${
src
}
"
COPYONLY
)
list
(
APPEND tmp
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
INCLUDE_DIR
}
/
${
src
}
"
)
endif
()
endforeach
()
set
(
${
out
}
"
${
tmp
}
"
PARENT_SCOPE
)
...
...
@@ -63,8 +63,8 @@ function (configure_sources out)
set
(
tmp
)
foreach
(
src IN LISTS ARGN
)
if
(
src MATCHES
".h$"
AND EXISTS
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
.in"
)
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
.in"
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
NAMESPACE
}
/
${
src
}
"
@ONLY
)
list
(
APPEND tmp
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
NAMESPACE
}
/
${
src
}
"
)
configure_file
(
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
.in"
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
INCLUDE_DIR
}
/
${
src
}
"
@ONLY
)
list
(
APPEND tmp
"
${
PROJECT_BINARY_DIR
}
/include/
${
GFLAGS_
INCLUDE_DIR
}
/
${
src
}
"
)
else
()
list
(
APPEND tmp
"
${
PROJECT_SOURCE_DIR
}
/src/
${
src
}
"
)
endif
()
...
...
src/gflags_declare.h.in
View file @
9a257c0b
...
...
@@ -113,13 +113,13 @@ typedef std::string clstring;
DECLARE_VARIABLE(bool, B, name)
#define DECLARE_int32(name) \
DECLARE_VARIABLE(
GFLAGS_NAMESPACE
::int32, I, name)
DECLARE_VARIABLE(
::@GFLAGS_NAMESPACE@
::int32, I, name)
#define DECLARE_int64(name) \
DECLARE_VARIABLE(
GFLAGS_NAMESPACE
::int64, I64, name)
DECLARE_VARIABLE(
::@GFLAGS_NAMESPACE@
::int64, I64, name)
#define DECLARE_uint64(name) \
DECLARE_VARIABLE(
GFLAGS_NAMESPACE
::uint64, U64, name)
DECLARE_VARIABLE(
::@GFLAGS_NAMESPACE@
::uint64, U64, name)
#define DECLARE_double(name) \
DECLARE_VARIABLE(double, D, name)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment