mirror of
https://github.com/gflags/gflags.git
synced 2025-04-19 19:53:45 +00:00
Compare commits
21 commits
Author | SHA1 | Date | |
---|---|---|---|
|
1a02f2851e | ||
|
ced6f8e70d | ||
|
7e0245c64f | ||
|
796b381af3 | ||
|
4c4c57dd98 | ||
|
1aadb4df7e | ||
|
32b0309117 | ||
|
379d22daad | ||
|
7f567f4f1e | ||
|
e08941a643 | ||
|
d9766dd541 | ||
|
6519b845dc | ||
|
24e652d81a | ||
|
1c5a6e4d2a | ||
|
959e970a8e | ||
|
18e30b9332 | ||
|
b8cdd02dbf | ||
|
c59f14dc3b | ||
|
d01821e3c0 | ||
|
76a38fb36e | ||
|
986e862615 |
19 changed files with 348 additions and 1071 deletions
|
@ -1,5 +1,9 @@
|
|||
cmake_minimum_required (VERSION 2.8.4 FATAL_ERROR)
|
||||
|
||||
if (POLICY CMP0042)
|
||||
cmake_policy (SET CMP0042 NEW)
|
||||
endif ()
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# includes
|
||||
set (CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||
|
@ -8,12 +12,20 @@ include (utils)
|
|||
# ----------------------------------------------------------------------------
|
||||
# package information
|
||||
set (PACKAGE_NAME "gflags")
|
||||
set (PACKAGE_VERSION "2.1.1")
|
||||
set (PACKAGE_VERSION "2.1.2")
|
||||
set (PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
set (PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}")
|
||||
set (PACKAGE_BUGREPORT "https://code.google.com/p/gflags/issues/")
|
||||
set (PACKAGE_BUGREPORT "https://github.com/schuhschuh/gflags/issues")
|
||||
|
||||
project (${PACKAGE_NAME} CXX)
|
||||
if (CMAKE_VERSION VERSION_LESS 100)
|
||||
# C language still needed because the following required CMake modules
|
||||
# (or their dependencies, respectively) are not correctly handling
|
||||
# the case where only CXX is enabled.
|
||||
# - CheckTypeSize.cmake (fixed in CMake 3.1, cf. http://www.cmake.org/Bug/view.php?id=14056)
|
||||
# - FindThreads.cmake (--> CheckIncludeFiles.cmake <--)
|
||||
enable_language (C)
|
||||
endif ()
|
||||
|
||||
version_numbers (
|
||||
${PACKAGE_VERSION}
|
||||
|
@ -22,17 +34,28 @@ version_numbers (
|
|||
PACKAGE_VERSION_PATCH
|
||||
)
|
||||
|
||||
set (PACKAGE_SOVERSION "${PACKAGE_VERSION_MAJOR}")
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# options
|
||||
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")
|
||||
if (NOT GFLAGS_NAMESPACE)
|
||||
# maintain binary backwards compatibility with gflags library version <= 2.0,
|
||||
# but at the same time enable the use of the preferred new "gflags" namespace
|
||||
set (GFLAGS_NAMESPACE "google;${PACKAGE_NAME}" CACHE STRING "Name(s) of library namespace (separate multiple options by semicolon)")
|
||||
mark_as_advanced (GFLAGS_NAMESPACE)
|
||||
endif ()
|
||||
if (GFLAGS_INCLUDE_DIR MATCHES "^\\.\\.[/\\]")
|
||||
message (FATAL_ERROR "GFLAGS_INCLUDE_DIR must not start with parent directory reference (../)")
|
||||
set (GFLAGS_NAMESPACE_SECONDARY "${GFLAGS_NAMESPACE}")
|
||||
list (REMOVE_DUPLICATES GFLAGS_NAMESPACE_SECONDARY)
|
||||
if (NOT GFLAGS_NAMESPACE_SECONDARY)
|
||||
message (FATAL_ERROR "GFLAGS_NAMESPACE must be set to one (or more) valid C++ namespace identifier(s separated by semicolon \";\").")
|
||||
endif ()
|
||||
foreach (ns IN LISTS GFLAGS_NAMESPACE_SECONDARY)
|
||||
if (NOT ns MATCHES "^[a-zA-Z][a-zA-Z0-9_]*$")
|
||||
message (FATAL_ERROR "GFLAGS_NAMESPACE contains invalid namespace identifier: ${ns}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
list (GET GFLAGS_NAMESPACE_SECONDARY 0 GFLAGS_NAMESPACE)
|
||||
list (REMOVE_AT GFLAGS_NAMESPACE_SECONDARY 0)
|
||||
|
||||
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)
|
||||
|
@ -45,8 +68,6 @@ 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)
|
||||
|
@ -67,6 +88,18 @@ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CXX_FLAGS)
|
|||
set_property (CACHE CMAKE_BUILD_TYPE PROPERTY VALUE Release)
|
||||
endif ()
|
||||
|
||||
if (NOT GFLAGS_INCLUDE_DIR)
|
||||
set (GFLAGS_INCLUDE_DIR "${PACKAGE_NAME}" CACHE STRING "Name of include directory of installed header files")
|
||||
mark_as_advanced (GFLAGS_INCLUDE_DIR)
|
||||
else ()
|
||||
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 ()
|
||||
endif ()
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# system checks
|
||||
include (CheckTypeSize)
|
||||
|
@ -154,7 +187,7 @@ else ()
|
|||
endif ()
|
||||
|
||||
set (CMAKE_THREAD_PREFER_PTHREAD TRUE)
|
||||
find_package (ThreadsCXX)
|
||||
find_package (Threads)
|
||||
if (Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
|
||||
set (HAVE_PTHREAD 1)
|
||||
check_type_size (pthread_rwlock_t RWLOCK LANGUAGE CXX)
|
||||
|
@ -181,6 +214,19 @@ set (PUBLIC_HDRS
|
|||
"gflags_completions.h"
|
||||
)
|
||||
|
||||
if (GFLAGS_NAMESPACE_SECONDARY)
|
||||
set (INCLUDE_GFLAGS_NS_H "// Import gflags library symbols into alternative/deprecated namespace(s)")
|
||||
foreach (ns IN LISTS GFLAGS_NAMESPACE_SECONDARY)
|
||||
string (TOUPPER "${ns}" NS)
|
||||
set (gflags_ns_h "${PROJECT_BINARY_DIR}/include/${GFLAGS_INCLUDE_DIR}/gflags_${ns}.h")
|
||||
configure_file ("${PROJECT_SOURCE_DIR}/src/gflags_ns.h.in" "${gflags_ns_h}" @ONLY)
|
||||
list (APPEND PUBLIC_HDRS "${gflags_ns_h}")
|
||||
set (INCLUDE_GFLAGS_NS_H "${INCLUDE_GFLAGS_NS_H}\n#include \"gflags_${ns}.h\"")
|
||||
endforeach ()
|
||||
else ()
|
||||
set (INCLUDE_GFLAGS_NS_H)
|
||||
endif ()
|
||||
|
||||
set (PRIVATE_HDRS
|
||||
"config.h"
|
||||
"util.h"
|
||||
|
@ -256,7 +302,9 @@ foreach (TYPE IN ITEMS STATIC SHARED)
|
|||
endif ()
|
||||
set_target_properties (
|
||||
gflags${opts}-${type} PROPERTIES COMPILE_DEFINITIONS "${defines}"
|
||||
OUTPUT_NAME "gflags${opts}"
|
||||
OUTPUT_NAME "gflags${opts}"
|
||||
VERSION "${PACKAGE_VERSION}"
|
||||
SOVERSION "${PACKAGE_SOVERSION}"
|
||||
)
|
||||
if (HAVE_SHLWAPI_H)
|
||||
target_link_libraries (gflags${opts}-${type} shlwapi.lib)
|
||||
|
@ -280,9 +328,18 @@ if (OS_WINDOWS)
|
|||
set (CONFIG_INSTALL_DIR CMake)
|
||||
else ()
|
||||
set (RUNTIME_INSTALL_DIR bin)
|
||||
set (LIBRARY_INSTALL_DIR lib)
|
||||
# The LIB_INSTALL_DIR and LIB_SUFFIX variables are used by the Fedora
|
||||
# package maintainers. Also package maintainers of other distribution
|
||||
# packages need to be able to specify the name of the library directory.
|
||||
if (NOT LIB_INSTALL_DIR)
|
||||
set (LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
|
||||
endif ()
|
||||
set (LIBRARY_INSTALL_DIR "${LIB_INSTALL_DIR}"
|
||||
CACHE PATH "Directory of installed libraries, e.g., \"lib64\""
|
||||
)
|
||||
mark_as_advanced (LIBRARY_INSTALL_DIR)
|
||||
set (INCLUDE_INSTALL_DIR include)
|
||||
set (CONFIG_INSTALL_DIR lib/cmake/${PACKAGE_NAME})
|
||||
set (CONFIG_INSTALL_DIR ${LIBRARY_INSTALL_DIR}/cmake/${PACKAGE_NAME})
|
||||
endif ()
|
||||
|
||||
file (RELATIVE_PATH INSTALL_PREFIX_REL2CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/${CONFIG_INSTALL_DIR}" "${CMAKE_INSTALL_PREFIX}")
|
||||
|
@ -355,6 +412,9 @@ if (BUILD_PACKAGING)
|
|||
set (CPACK_SOURCE_GENERATOR "${PACKAGE_SOURCE_GENERATOR}" CACHE STRING "List of source package generators (CPack).")
|
||||
mark_as_advanced (CPACK_GENERATOR CPACK_SOURCE_GENERATOR)
|
||||
|
||||
# some package generators (e.g., PackageMaker) do not allow .md extension
|
||||
configure_file ("${CMAKE_CURRENT_LIST_DIR}/README.md" "${CMAKE_CURRENT_BINARY_DIR}/README.txt" COPYONLY)
|
||||
|
||||
# common package information
|
||||
set (CPACK_PACKAGE_VENDOR "Andreas Schuh")
|
||||
set (CPACK_PACKAGE_CONTACT "google-gflags@googlegroups.com")
|
||||
|
@ -364,9 +424,9 @@ if (BUILD_PACKAGING)
|
|||
set (CPACK_PACKAGE_VERSION_MINOR "${PACKAGE_VERSION_MINOR}")
|
||||
set (CPACK_PACKAGE_VERSION_PATCH "${PACKAGE_VERSION_PATCH}")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "A commandline flags library that allows for distributed flags.")
|
||||
set (CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_LIST_DIR}/README.txt")
|
||||
set (CPACK_RESOURCE_FILE_WELCOME "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
|
||||
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_LIST_DIR}/COPYING.txt")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_LIST_DIR}/README.txt")
|
||||
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
|
||||
set (CPACK_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
set (CPACK_OUTPUT_FILE_PREFIX packages)
|
||||
set (CPACK_PACKAGE_RELOCATABLE TRUE)
|
||||
|
@ -375,11 +435,11 @@ if (BUILD_PACKAGING)
|
|||
# RPM package information -- used in cmake/package.cmake.in also for DEB
|
||||
set (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
|
||||
set (CPACK_RPM_PACKAGE_LICENSE "BSD")
|
||||
set (CPACK_RPM_PACKAGE_URL "http://code.google.com/p/gflags")
|
||||
set (CPACK_RPM_PACKAGE_URL "http://schuhschuh.github.com/gflags")
|
||||
set (CPACK_RPM_CHANGELOG_FILE "${CMAKE_CURRENT_LIST_DIR}/ChangeLog.txt")
|
||||
|
||||
if (INSTALL_HEADERS)
|
||||
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_LIST_DIR}/doc/gflags.html")
|
||||
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_LIST_DIR}/doc/index.html")
|
||||
else ()
|
||||
set (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_LIST_DIR}/cmake/README_runtime.txt")
|
||||
endif ()
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
* Tue Mar 24 2014 - Andreas Schuh <andreas.schuh.84@gmail.com>
|
||||
|
||||
- gflags: version 2.1.2
|
||||
- Moved project to GitHub
|
||||
- Added GFLAGS_NAMESPACE definition to gflags_declare.h
|
||||
- Fixed issue 94: Keep "google" as primary namespace and import symbols into "gflags" namespace
|
||||
- Fixed issue 96: Fix binary ABI compatibility with gflags 2.0 using "google" as primary namespace
|
||||
- Fixed issue 97/101: Removed (patched) CMake modules and enabled C language instead
|
||||
- Fixed issue 103: Set CMake policy CMP0042 to silence warning regarding MACOS_RPATH setting
|
||||
|
||||
* Sun Mar 20 2014 - Andreas Schuh <google-gflags@googlegroups.com>
|
||||
|
||||
- gflags: version 2.1.1
|
||||
|
|
54
INSTALL.md
Normal file
54
INSTALL.md
Normal file
|
@ -0,0 +1,54 @@
|
|||
Installing a binary distribution package
|
||||
========================================
|
||||
|
||||
No official binary distribution packages are provided by the gflags developers.
|
||||
There may, however, be binary packages available for your OS. Please consult
|
||||
also the package repositories of your Linux distribution.
|
||||
|
||||
For example on Debian/Ubuntu Linux, gflags can be installed using the
|
||||
following command:
|
||||
|
||||
sudo apt-get install gflags
|
||||
|
||||
|
||||
Compiling the source code
|
||||
=========================
|
||||
|
||||
The build system of gflags is since version 2.1 based on [CMake](http://cmake.org).
|
||||
The common steps to build, test, and install software are therefore:
|
||||
|
||||
1. Extract source files.
|
||||
2. Create build directory and change to it.
|
||||
3. Run CMake to configure the build tree.
|
||||
4. Build the software using selected build tool.
|
||||
5. Test the built software.
|
||||
6. Install the built files.
|
||||
|
||||
On Unix-like systems with GNU Make as build tool, these build steps can be
|
||||
summarized by the following sequence of commands executed in a shell,
|
||||
where ```$package``` and ```$version``` are shell variables which represent
|
||||
the name of this package and the obtained version of the software.
|
||||
|
||||
$ tar xzf gflags-$version-source.tar.gz
|
||||
$ cd gflags-$version
|
||||
$ mkdir build && cd build
|
||||
$ ccmake ..
|
||||
|
||||
- Press 'c' to configure the build system and 'e' to ignore warnings.
|
||||
- Set CMAKE_INSTALL_PREFIX and other CMake variables and options.
|
||||
- Continue pressing 'c' until the option 'g' is available.
|
||||
- Then press 'g' to generate the configuration files for GNU Make.
|
||||
|
||||
$ make
|
||||
$ make test (optional)
|
||||
$ make install (optional)
|
||||
|
||||
In the following, only gflags-specific CMake settings available to
|
||||
configure the build and installation are documented.
|
||||
|
||||
|
||||
CMake Option | Description
|
||||
---------------------- | -------------------------------------------------------
|
||||
CMAKE_INSTALL_PREFIX | Installation directory, e.g., "/usr/local" on Unix and "C:\Program Files\gflags" on Windows.
|
||||
GFLAGS_NAMESPACE | Name of the C++ namespace to be used by the gflags library. Note that the public source header files are installed in a subdirectory named after this namespace. To maintain backwards compatibility with the Google Commandline Flags, set this variable to "google". The default is "gflags".
|
||||
GFLAGS_INCLUDE_DIR | Name of include subdirectory where headers are installed into.
|
70
INSTALL.txt
70
INSTALL.txt
|
@ -1,70 +0,0 @@
|
|||
|
||||
INSTALLING A BINARY DISTRIBUTION PACKAGE
|
||||
========================================
|
||||
|
||||
No official binary distribution packages are provided by the gflags developers.
|
||||
There may, however, be binary packages available for your OS at
|
||||
https://code.google.com/p/gflags/downloads/list. Please consult also the
|
||||
package repositories of your Linux distribution.
|
||||
|
||||
For example on Debian/Ubuntu Linux, gflags can be installed using the
|
||||
following command:
|
||||
|
||||
$ sudo apt-get install gflags
|
||||
|
||||
|
||||
|
||||
BUILDING THE SOFTWARE FROM SOURCES
|
||||
==================================
|
||||
|
||||
Build Steps
|
||||
-----------
|
||||
|
||||
The build system of gflags is since version 2.1 based on CMake (cmake.org).
|
||||
The common steps to build, test, and install software based on CMake are:
|
||||
|
||||
1. Extract source files.
|
||||
2. Create build directory and change to it.
|
||||
3. Run CMake to configure the build tree.
|
||||
4. Build the software using selected build tool.
|
||||
5. Test the built software.
|
||||
6. Install the built files.
|
||||
|
||||
On Unix-like systems with GNU Make as build tool, these build steps can be
|
||||
summarized by the following sequence of commands executed in a shell,
|
||||
where $package and $version are shell variables which represent the name
|
||||
of this package and the obtained version of the software.
|
||||
|
||||
$ tar xzf gflags-$version-source.tar.gz
|
||||
$ cd gflags-$version
|
||||
$ mkdir build && cd build
|
||||
$ ccmake ..
|
||||
|
||||
- Press 'c' to configure the build system and 'e' to ignore warnings.
|
||||
- Set CMAKE_INSTALL_PREFIX and other CMake variables and options.
|
||||
- Continue pressing 'c' until the option 'g' is available.
|
||||
- Then press 'g' to generate the configuration files for GNU Make.
|
||||
|
||||
$ make
|
||||
$ make test (optional)
|
||||
$ make install (optional)
|
||||
|
||||
In the following, only gflags-specific CMake settings available to
|
||||
configure the build and installation are documented.
|
||||
|
||||
|
||||
CMake Options
|
||||
-------------
|
||||
|
||||
- CMAKE_INSTALL_PREFIX Installation directory, e.g., "/usr/local" on Unix
|
||||
and "C:\Program Files\gflags" on Windows.
|
||||
|
||||
|
||||
Advanced CMake Options
|
||||
----------------------
|
||||
|
||||
- GFLAGS_NAMESPACE Name of the C++ namespace to be used by the gflags library.
|
||||
Note that the public source header files are installed in
|
||||
a subdirectory named after this namespace. To maintain
|
||||
backwards compatibility with the Google Commandline Flags,
|
||||
set this variable to "google". The default is "gflags".
|
|
@ -1,22 +1,41 @@
|
|||
=== 30 March 2014 ===
|
||||
24 March 2015
|
||||
-------------
|
||||
|
||||
Released gflags 2.1.2 with fixes of ABI incompatibilities to 2.0 caused
|
||||
by namespace change. The deprecated "google" namespace is yet kept as primary
|
||||
namespace while sybmols are imported into the new "gflags" namespace by default.
|
||||
This can be configured using GFLAGS_NAMESPACE and GLAGS_INCLUDE_DIR. Problems
|
||||
with the (patched) CMake modules FindThreads.cmake and CheckTypeSize.cmake
|
||||
are resolved by re-enabling the C language again even though gflags is C++.
|
||||
|
||||
Finalized move of gflags project from Google Code to GitHub.
|
||||
Email addresses of original issue reporters got lost in the process.
|
||||
Given the age of most issue reports, this should be neglibable.
|
||||
|
||||
Please report any further issues using the GitHub issue tracker.
|
||||
|
||||
|
||||
30 March 2014
|
||||
-------------
|
||||
|
||||
I've just released gflags 2.1.1.
|
||||
|
||||
This release fixes a few bugs in the configuration of gflags_declare.h
|
||||
and adds a separate GFLAGS_INCLUDE_DIR CMake variable to the build configuration.
|
||||
Setting GFLAGS_NAMESPACE to "google" no longer changes also the include
|
||||
This release fixes a few bugs in the configuration of gflags\_declare.h
|
||||
and adds a separate GFLAGS\_INCLUDE\_DIR CMake variable to the build configuration.
|
||||
Setting GFLAGS\_NAMESPACE to "google" no longer changes also the include
|
||||
path of the public header files. This allows the use of the library with
|
||||
other Google projects such as glog which still use the deprecated "google"
|
||||
namespace for the gflags library, but include it as "gflags/gflags.h".
|
||||
|
||||
=== 20 March 2014 ===
|
||||
20 March 2014
|
||||
-------------
|
||||
|
||||
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. The default namespace
|
||||
of all C++ symbols is now "gflags" instead of "google". This can be
|
||||
configured via the GFLAGS_NAMESPACE variable.
|
||||
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,
|
||||
|
@ -28,34 +47,36 @@ hosting of this project remains at Google Code. Thanks to the distributed
|
|||
character of Git, I can push (and pull) changes from both GitHub and Google Code
|
||||
in order to keep the two public repositories in sync.
|
||||
When fixing an issue for a pull request through either of these hosting
|
||||
platforms, please reference the issue number as
|
||||
[https://code.google.com/p/support/wiki/IssueTracker#Integration_with_version_control described here].
|
||||
platforms, please reference the issue number as
|
||||
[described here](https://code.google.com/p/support/wiki/IssueTracker#Integration_with_version_control).
|
||||
For the further development, I am following the
|
||||
[http://nvie.com/posts/a-successful-git-branching-model/ Git branching model]
|
||||
[Git branching model](http://nvie.com/posts/a-successful-git-branching-model/)
|
||||
with feature branch names prefixed by "feature/" and bugfix branch names
|
||||
prefixed by "bugfix/", respectively.
|
||||
|
||||
Binary and source [https://github.com/schuhschuh/gflags/releases packages] are available on GitHub.
|
||||
Binary and source [packages](https://github.com/schuhschuh/gflags/releases) are available on GitHub.
|
||||
|
||||
|
||||
=== 14 January 2013 ===
|
||||
14 January 2013
|
||||
---------------
|
||||
|
||||
The migration of the build system to CMake is almost complete.
|
||||
What remains to be done is rewriting the tests in Python such they can be
|
||||
executed on non-Unix platforms and splitting them up into separate CTest tests.
|
||||
Though merging these changes into the master branch yet remains to be done,
|
||||
it is recommended to already start using the
|
||||
[https://github.com/schuhschuh/gflags/tree/cmake-migration cmake-migration] branch.
|
||||
[cmake-migration](https://github.com/schuhschuh/gflags/tree/cmake-migration) branch.
|
||||
|
||||
|
||||
=== 20 April 2013 ===
|
||||
20 April 2013
|
||||
-------------
|
||||
|
||||
More than a year has past since I (Andreas) took over the maintenance for
|
||||
`gflags`. Only few minor changes have been made since then, much to my regret.
|
||||
To get more involved and stimulate participation in the further
|
||||
development of the library, I moved the project source code today to
|
||||
[https://github.com/schuhschuh/gflags GitHub].
|
||||
I believe that the strengths of [http://git-scm.com/ Git] will allow for better community collaboration
|
||||
[GitHub](https://github.com/schuhschuh/gflags).
|
||||
I believe that the strengths of [Git](http://git-scm.com/) will allow for better community collaboration
|
||||
as well as ease the integration of changes made by others. I encourage everyone
|
||||
who would like to contribute to send me pull requests.
|
||||
Git's lightweight feature branches will also provide the right tool for more
|
||||
|
@ -74,13 +95,14 @@ Please continue to report any issues with gflags on Google Code. The GitHub proj
|
|||
only be used to host the Git repository.
|
||||
|
||||
One major change of the project structure I have in mind for the next weeks
|
||||
is the migration from autotools to [http://www.cmake.org/ CMake].
|
||||
is the migration from autotools to [CMake](http://www.cmake.org/).
|
||||
Check out the (unstable!)
|
||||
[https://github.com/schuhschuh/gflags/tree/cmake-migration cmake-migration]
|
||||
[cmake-migration](https://github.com/schuhschuh/gflags/tree/cmake-migration)
|
||||
branch on GitHub for details.
|
||||
|
||||
|
||||
=== 25 January 2012 ===
|
||||
25 January 2012
|
||||
---------------
|
||||
|
||||
I've just released gflags 2.0.
|
||||
|
||||
|
@ -91,8 +113,7 @@ around gflags and the ideas you have for the project going forward,
|
|||
and look forward to having you on the team.
|
||||
|
||||
I bumped the major version number up to 2 to reflect the new community
|
||||
ownership of the project. All the
|
||||
[http://gflags.googlecode.com/svn/tags/gflags-2.0/ChangeLog changes]
|
||||
ownership of the project. All the [changes](ChangeLog.txt)
|
||||
are related to the renaming. There are no functional changes from
|
||||
gflags 1.7. In particular, I've kept the code in the namespace
|
||||
`google`, though in a future version it should be renamed to `gflags`.
|
||||
|
@ -101,7 +122,8 @@ synonym of `/usr/local/include/gflags/`, though the former name has
|
|||
been obsolete for some time now.
|
||||
|
||||
|
||||
=== 18 January 2011 ===
|
||||
18 January 2011
|
||||
---------------
|
||||
|
||||
The `google-gflags` Google Code page has been renamed to
|
||||
`gflags`, in preparation for the project being renamed to
|
||||
|
@ -111,15 +133,16 @@ relinquishing ownership of the project; it will now be entirely
|
|||
community run. The name change reflects that shift.
|
||||
|
||||
|
||||
=== 20 December 2011 ===
|
||||
20 December 2011
|
||||
----------------
|
||||
|
||||
I've just released gflags 1.7. This is a minor release; the major
|
||||
change is that `CommandLineFlagInfo` now exports the address in memory
|
||||
where the flag is located. There has also been a bugfix involving
|
||||
very long --help strings, and some other minor
|
||||
[http://code.google.com/p/google-gflags/source/browse/tags/gflags-1.7/ChangeLog changes].
|
||||
very long --help strings, and some other minor [changes](ChangeLog.txt).
|
||||
|
||||
=== 29 July 2011 ===
|
||||
29 July 2011
|
||||
------------
|
||||
|
||||
I've just released gflags 1.6. The major new feature in this release
|
||||
is support for setting version info, so that --version does something
|
||||
|
@ -138,11 +161,10 @@ frequent updates with better change descriptions. They will also
|
|||
result in future `ChangeLog` entries being much more verbose (for better
|
||||
or for worse).
|
||||
|
||||
See the
|
||||
[http://code.google.com/p/google-gflags/source/browse/tags/gflags-1.6/ChangeLog ChangeLog]
|
||||
for a full list of changes for this release.
|
||||
See the [ChangeLog](ChangeLog.txt) for a full list of changes for this release.
|
||||
|
||||
=== 24 January 2011 ===
|
||||
24 January 2011
|
||||
---------------
|
||||
|
||||
I've just released gflags 1.5. This release has only minor changes
|
||||
from 1.4, including some slightly better reporting in --help, and
|
||||
|
@ -152,28 +174,30 @@ libraries under valgrind. The major change is to fix up the macros
|
|||
|
||||
If you have not had a problem with these macros, and don't need any of
|
||||
the other changes described, there is no need to upgrade. See the
|
||||
[http://code.google.com/p/google-gflags/source/browse/tags/gflags-1.5/ChangeLog ChangeLog]
|
||||
for a full list of changes for this release.
|
||||
[ChangeLog](ChangeLog.txt) for a full list of changes for this release.
|
||||
|
||||
=== 11 October 2010 ===
|
||||
11 October 2010
|
||||
---------------
|
||||
|
||||
I've just released gflags 1.4. This release has only minor changes
|
||||
from 1.3, including some documentation tweaks and some work to make
|
||||
the library smaller. If 1.3 is working well for you, there's no
|
||||
particular reason to upgrade.
|
||||
|
||||
=== 4 January 2010 ===
|
||||
4 January 2010
|
||||
--------------
|
||||
|
||||
I've just released gflags 1.3. gflags now compiles under MSVC, and
|
||||
all tests pass. I *really* never thought non-unix-y Windows folks
|
||||
all tests pass. I **really** never thought non-unix-y Windows folks
|
||||
would want gflags, but at least some of them do.
|
||||
|
||||
The major news, though, is that I've separated out the python package
|
||||
into its own library, [http://code.google.com/p/python-gflags python-gflags].
|
||||
into its own library, [python-gflags](http://code.google.com/p/python-gflags).
|
||||
If you're interested in the Python version of gflags, that's the place to
|
||||
get it now.
|
||||
|
||||
=== 10 September 2009 ==
|
||||
10 September 2009
|
||||
-----------------
|
||||
|
||||
I've just released gflags 1.2. The major change from gflags 1.1 is it
|
||||
now compiles under MinGW (as well as cygwin), and all tests pass. I
|
||||
|
@ -184,14 +208,13 @@ wrong!
|
|||
The other changes are minor, such as support for --htmlxml in the
|
||||
python version of gflags.
|
||||
|
||||
=== 15 April 2009 ===
|
||||
15 April 2009
|
||||
-------------
|
||||
|
||||
I've just released gflags 1.1. It has only minor changes fdrom gflags
|
||||
1.0 (see the
|
||||
[http://code.google.com/p/google-gflags/source/browse/tags/gflags-1.1/ChangeLog ChangeLog]
|
||||
for details). The major change is that I moved to a new
|
||||
system for creating .deb and .rpm files. This allows me to create
|
||||
x86_64 deb and rpm files.
|
||||
1.0 (see the [ChangeLog](ChangeLog.txt) for details).
|
||||
The major change is that I moved to a new system for creating .deb and .rpm files.
|
||||
This allows me to create x86\_64 deb and rpm files.
|
||||
|
||||
In the process of moving to this new system, I noticed an
|
||||
inconsistency: the tar.gz and .rpm files created libraries named
|
||||
|
@ -199,7 +222,7 @@ libgflags.so, but the deb file created libgoogle-gflags.so. I have
|
|||
fixed the deb file to create libraries like the others. I'm no expert
|
||||
in debian packaging, but I believe this has caused the package name to
|
||||
change as well. Please let me know (at
|
||||
[mailto:google-gflags@googlegroups.com
|
||||
[[mailto:google-gflags@googlegroups.com](mailto:google-gflags@googlegroups.com)
|
||||
google-gflags@googlegroups.com]) if this causes problems for you --
|
||||
especially if you know of a fix! I would be happy to change the deb
|
||||
packages to add symlinks from the old library name to the new
|
||||
|
@ -210,20 +233,21 @@ If you've tried to install a .rpm or .deb and it doesn't work for you,
|
|||
let me know. I'm excited to finally have 64-bit package files, but
|
||||
there may still be some wrinkles in the new system to iron out.
|
||||
|
||||
=== 1 October 2008 ===
|
||||
1 October 2008
|
||||
--------------
|
||||
|
||||
gflags 1.0rc2 was out for a few weeks without any issues, so gflags
|
||||
1.0 is now released. This is much like gflags 0.9. The major change
|
||||
is that the .h files have been moved from `/usr/include/google` to
|
||||
`/usr/include/gflags`. While I have backwards-compatibility
|
||||
forwarding headeds in place, please rewrite existing code to say
|
||||
{{{
|
||||
```
|
||||
#include <gflags/gflags.h>
|
||||
}}}
|
||||
```
|
||||
instead of
|
||||
{{{
|
||||
```
|
||||
#include <google/gflags.h>
|
||||
}}}
|
||||
```
|
||||
|
||||
I've kept the default namespace to google. You can still change with
|
||||
with the appropriate flag to the configure script (`./configure
|
||||
|
@ -233,8 +257,7 @@ non-backwards-compatible change, send mail to
|
|||
`google-gflags@googlegroups.com`!
|
||||
|
||||
Version 1.0 also has some neat new features, like support for bash
|
||||
commandline-completion of help flags. See the
|
||||
[http://code.google.com/p/google-gflags/source/browse/tags/gflags-1.0rc2/ChangeLog
|
||||
ChangeLog] for more details.
|
||||
commandline-completion of help flags. See the [ChangeLog](ChangeLog.txt)
|
||||
for more details.
|
||||
|
||||
If I don't hear any bad news for a few weeks, I'll release 1.0-final.
|
|
@ -1,4 +0,0 @@
|
|||
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.
|
|
@ -1,300 +0,0 @@
|
|||
# Copied from master branch of CMake (commit SHA 34a49dea) before release of
|
||||
# this newer version which seems to fix a bug of the one coming with CMake 2.8-12.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2004-2011 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# This file sets the basic flags for the C++ language in CMake.
|
||||
# It also loads the available platform file for the system-compiler
|
||||
# if it exists.
|
||||
# It also loads a system - compiler - processor (or target hardware)
|
||||
# specific file, which is mainly useful for crosscompiling and embedded systems.
|
||||
|
||||
# some compilers use different extensions (e.g. sdcc uses .rel)
|
||||
# so set the extension here first so it can be overridden by the compiler specific file
|
||||
if(UNIX)
|
||||
set(CMAKE_CXX_OUTPUT_EXTENSION .o)
|
||||
else()
|
||||
set(CMAKE_CXX_OUTPUT_EXTENSION .obj)
|
||||
endif()
|
||||
|
||||
set(_INCLUDED_FILE 0)
|
||||
|
||||
# Load compiler-specific information.
|
||||
if(CMAKE_CXX_COMPILER_ID)
|
||||
include(Compiler/${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL)
|
||||
endif()
|
||||
|
||||
set(CMAKE_BASE_NAME)
|
||||
get_filename_component(CMAKE_BASE_NAME "${CMAKE_CXX_COMPILER}" NAME_WE)
|
||||
# since the gnu compiler has several names force g++
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_BASE_NAME g++)
|
||||
endif()
|
||||
|
||||
|
||||
# load a hardware specific file, mostly useful for embedded compilers
|
||||
if(CMAKE_SYSTEM_PROCESSOR)
|
||||
if(CMAKE_CXX_COMPILER_ID)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
||||
endif()
|
||||
if (NOT _INCLUDED_FILE)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
# load the system- and compiler specific files
|
||||
if(CMAKE_CXX_COMPILER_ID)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
|
||||
endif()
|
||||
if (NOT _INCLUDED_FILE)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL
|
||||
RESULT_VARIABLE _INCLUDED_FILE)
|
||||
endif ()
|
||||
# We specify the compiler information in the system file for some
|
||||
# platforms, but this language may not have been enabled when the file
|
||||
# was first included. Include it again to get the language info.
|
||||
# Remove this when all compiler info is removed from system files.
|
||||
if (NOT _INCLUDED_FILE)
|
||||
include(Platform/${CMAKE_SYSTEM_NAME} OPTIONAL)
|
||||
endif ()
|
||||
|
||||
if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||
foreach(f ${CMAKE_CXX_ABI_FILES})
|
||||
include(${f})
|
||||
endforeach()
|
||||
unset(CMAKE_CXX_ABI_FILES)
|
||||
endif()
|
||||
|
||||
# This should be included before the _INIT variables are
|
||||
# used to initialize the cache. Since the rule variables
|
||||
# have if blocks on them, users can still define them here.
|
||||
# But, it should still be after the platform file so changes can
|
||||
# be made to those values.
|
||||
|
||||
if(CMAKE_USER_MAKE_RULES_OVERRIDE)
|
||||
# Save the full path of the file so try_compile can use it.
|
||||
include(${CMAKE_USER_MAKE_RULES_OVERRIDE} RESULT_VARIABLE _override)
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE "${_override}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
|
||||
# Save the full path of the file so try_compile can use it.
|
||||
include(${CMAKE_USER_MAKE_RULES_OVERRIDE_CXX} RESULT_VARIABLE _override)
|
||||
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX "${_override}")
|
||||
endif()
|
||||
|
||||
|
||||
# Create a set of shared library variable specific to C++
|
||||
# For 90% of the systems, these are the same flags as the C versions
|
||||
# so if these are not set just copy the flags from the c version
|
||||
if(NOT CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS)
|
||||
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILE_OPTIONS_PIC)
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_PIC ${CMAKE_C_COMPILE_OPTIONS_PIC})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILE_OPTIONS_PIE)
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_COMPILE_OPTIONS_DLL)
|
||||
set(CMAKE_CXX_COMPILE_OPTIONS_DLL ${CMAKE_C_COMPILE_OPTIONS_DLL})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SHARED_LIBRARY_CXX_FLAGS)
|
||||
set(CMAKE_SHARED_LIBRARY_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG)
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP)
|
||||
set(CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG)
|
||||
set(CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_EXE_EXPORTS_CXX_FLAG)
|
||||
set(CMAKE_EXE_EXPORTS_CXX_FLAG ${CMAKE_EXE_EXPORTS_C_FLAG})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG)
|
||||
set(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_SONAME_C_FLAG})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG)
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP)
|
||||
set(CMAKE_EXECUTABLE_RUNTIME_CXX_FLAG_SEP ${CMAKE_SHARED_LIBRARY_RUNTIME_CXX_FLAG_SEP})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG)
|
||||
set(CMAKE_EXECUTABLE_RPATH_LINK_CXX_FLAG ${CMAKE_SHARED_LIBRARY_RPATH_LINK_CXX_FLAG})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH)
|
||||
set(CMAKE_SHARED_LIBRARY_LINK_CXX_WITH_RUNTIME_PATH ${CMAKE_SHARED_LIBRARY_LINK_C_WITH_RUNTIME_PATH})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INCLUDE_FLAG_CXX)
|
||||
set(CMAKE_INCLUDE_FLAG_CXX ${CMAKE_INCLUDE_FLAG_C})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INCLUDE_FLAG_SEP_CXX)
|
||||
set(CMAKE_INCLUDE_FLAG_SEP_CXX ${CMAKE_INCLUDE_FLAG_SEP_C})
|
||||
endif()
|
||||
|
||||
# for most systems a module is the same as a shared library
|
||||
# so unless the variable CMAKE_MODULE_EXISTS is set just
|
||||
# copy the values from the LIBRARY variables
|
||||
if(NOT CMAKE_MODULE_EXISTS)
|
||||
set(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
|
||||
set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS})
|
||||
endif()
|
||||
|
||||
# repeat for modules
|
||||
if(NOT CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS)
|
||||
set(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS})
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_SHARED_MODULE_CXX_FLAGS)
|
||||
set(CMAKE_SHARED_MODULE_CXX_FLAGS ${CMAKE_SHARED_MODULE_C_FLAGS})
|
||||
endif()
|
||||
|
||||
# Initialize CXX link type selection flags from C versions.
|
||||
foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
|
||||
if(NOT CMAKE_${type}_LINK_STATIC_CXX_FLAGS)
|
||||
set(CMAKE_${type}_LINK_STATIC_CXX_FLAGS
|
||||
${CMAKE_${type}_LINK_STATIC_C_FLAGS})
|
||||
endif()
|
||||
if(NOT CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS)
|
||||
set(CMAKE_${type}_LINK_DYNAMIC_CXX_FLAGS
|
||||
${CMAKE_${type}_LINK_DYNAMIC_C_FLAGS})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# add the flags to the cache based
|
||||
# on the initial values computed in the platform/*.cmake files
|
||||
# use _INIT variables so that this only happens the first time
|
||||
# and you can set these flags in the cmake cache
|
||||
set(CMAKE_CXX_FLAGS_INIT "$ENV{CXXFLAGS} ${CMAKE_CXX_FLAGS_INIT}")
|
||||
# avoid just having a space as the initial value for the cache
|
||||
if(CMAKE_CXX_FLAGS_INIT STREQUAL " ")
|
||||
set(CMAKE_CXX_FLAGS_INIT)
|
||||
endif()
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_INIT}" CACHE STRING
|
||||
"Flags used by the compiler during all build types.")
|
||||
|
||||
if(NOT CMAKE_NOT_USING_CONFIG_FLAGS)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG_INIT}" CACHE STRING
|
||||
"Flags used by the compiler during debug builds.")
|
||||
set (CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL_INIT}" CACHE STRING
|
||||
"Flags used by the compiler during release builds for minimum size.")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE_INIT}" CACHE STRING
|
||||
"Flags used by the compiler during release builds.")
|
||||
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT}" CACHE STRING
|
||||
"Flags used by the compiler during release builds with debug info.")
|
||||
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_STANDARD_LIBRARIES_INIT)
|
||||
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES_INIT}"
|
||||
CACHE STRING "Libraries linked by default with all C++ applications.")
|
||||
mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES)
|
||||
endif()
|
||||
|
||||
include(CMakeCommonLanguageInclude)
|
||||
|
||||
# now define the following rules:
|
||||
# CMAKE_CXX_CREATE_SHARED_LIBRARY
|
||||
# CMAKE_CXX_CREATE_SHARED_MODULE
|
||||
# CMAKE_CXX_COMPILE_OBJECT
|
||||
# CMAKE_CXX_LINK_EXECUTABLE
|
||||
|
||||
# variables supplied by the generator at use time
|
||||
# <TARGET>
|
||||
# <TARGET_BASE> the target without the suffix
|
||||
# <OBJECTS>
|
||||
# <OBJECT>
|
||||
# <LINK_LIBRARIES>
|
||||
# <FLAGS>
|
||||
# <LINK_FLAGS>
|
||||
|
||||
# CXX compiler information
|
||||
# <CMAKE_CXX_COMPILER>
|
||||
# <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS>
|
||||
# <CMAKE_CXX_SHARED_MODULE_CREATE_FLAGS>
|
||||
# <CMAKE_CXX_LINK_FLAGS>
|
||||
|
||||
# Static library tools
|
||||
# <CMAKE_AR>
|
||||
# <CMAKE_RANLIB>
|
||||
|
||||
|
||||
# create a shared C++ library
|
||||
if(NOT CMAKE_CXX_CREATE_SHARED_LIBRARY)
|
||||
set(CMAKE_CXX_CREATE_SHARED_LIBRARY
|
||||
"<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>")
|
||||
endif()
|
||||
|
||||
# create a c++ shared module copy the shared library rule by default
|
||||
if(NOT CMAKE_CXX_CREATE_SHARED_MODULE)
|
||||
set(CMAKE_CXX_CREATE_SHARED_MODULE ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
|
||||
endif()
|
||||
|
||||
|
||||
# Create a static archive incrementally for large object file counts.
|
||||
# If CMAKE_CXX_CREATE_STATIC_LIBRARY is set it will override these.
|
||||
if(NOT DEFINED CMAKE_CXX_ARCHIVE_CREATE)
|
||||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_CXX_ARCHIVE_APPEND)
|
||||
set(CMAKE_CXX_ARCHIVE_APPEND "<CMAKE_AR> r <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
endif()
|
||||
if(NOT DEFINED CMAKE_CXX_ARCHIVE_FINISH)
|
||||
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
|
||||
endif()
|
||||
|
||||
# compile a C++ file into an object file
|
||||
if(NOT CMAKE_CXX_COMPILE_OBJECT)
|
||||
set(CMAKE_CXX_COMPILE_OBJECT
|
||||
"<CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_CXX_LINK_EXECUTABLE)
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE
|
||||
"<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_VERBOSE_MAKEFILE
|
||||
CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_DEBUG)
|
||||
|
||||
set(CMAKE_CXX_INFORMATION_LOADED 1)
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
#.rst:
|
||||
# CheckLibraryExists
|
||||
# ------------------
|
||||
#
|
||||
# Check if the function exists.
|
||||
#
|
||||
# CHECK_LIBRARY_EXISTS (LIBRARY FUNCTION LOCATION VARIABLE)
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# LIBRARY - the name of the library you are looking for
|
||||
# FUNCTION - the name of the function
|
||||
# LOCATION - location where the library should be found
|
||||
# VARIABLE - variable to store the result
|
||||
#
|
||||
#
|
||||
#
|
||||
# The following variables may be set before calling this macro to modify
|
||||
# the way the check is run:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
|
||||
|
||||
macro(CHECK_CXX_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
|
||||
if("${VARIABLE}" MATCHES "^${VARIABLE}$")
|
||||
set(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
|
||||
"-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
|
||||
message(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
|
||||
set(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
set(CHECK_LIBRARY_EXISTS_LIBRARIES
|
||||
${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
|
||||
endif()
|
||||
configure_file(${CMAKE_ROOT}/Modules/CheckFunctionExists.c
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFunctionExists.cxx COPYONLY)
|
||||
try_compile(${VARIABLE}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckFunctionExists.cxx
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
LINK_LIBRARIES ${CHECK_LIBRARY_EXISTS_LIBRARIES}
|
||||
CMAKE_FLAGS
|
||||
-DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}
|
||||
-DLINK_DIRECTORIES:STRING=${LOCATION}
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
|
||||
if(${VARIABLE})
|
||||
message(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
|
||||
set(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
|
||||
"passed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
else()
|
||||
message(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
|
||||
set(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
|
||||
"failed with the following output:\n"
|
||||
"${OUTPUT}\n\n")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
|
@ -1,38 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <pthread.h>
|
||||
#include <unistd.h>
|
||||
|
||||
void* runner(void*);
|
||||
|
||||
int res = 0;
|
||||
#ifdef __CLASSIC_C__
|
||||
int main(){
|
||||
int ac;
|
||||
char*av[];
|
||||
#else
|
||||
int main(int ac, char*av[]){
|
||||
#endif
|
||||
pthread_t tid[2];
|
||||
pthread_create(&tid[0], 0, runner, (void*)1);
|
||||
pthread_create(&tid[1], 0, runner, (void*)2);
|
||||
|
||||
#if defined(__BEOS__) && !defined(__ZETA__) // (no usleep on BeOS 5.)
|
||||
usleep(1); // for strange behavior on single-processor sun
|
||||
#endif
|
||||
|
||||
pthread_join(tid[0], 0);
|
||||
pthread_join(tid[1], 0);
|
||||
if(ac > 1000){return *av[0];}
|
||||
return res;
|
||||
}
|
||||
|
||||
void* runner(void* args)
|
||||
{
|
||||
int cc;
|
||||
for ( cc = 0; cc < 10; cc ++ )
|
||||
{
|
||||
printf("%p CC: %d\n", args, cc);
|
||||
}
|
||||
res ++;
|
||||
return 0;
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
@headers@
|
||||
|
||||
#undef KEY
|
||||
#if defined(__i386)
|
||||
# define KEY '_','_','i','3','8','6'
|
||||
#elif defined(__x86_64)
|
||||
# define KEY '_','_','x','8','6','_','6','4'
|
||||
#elif defined(__ppc__)
|
||||
# define KEY '_','_','p','p','c','_','_'
|
||||
#elif defined(__ppc64__)
|
||||
# define KEY '_','_','p','p','c','6','4','_','_'
|
||||
#endif
|
||||
|
||||
#define SIZE (sizeof(@type@))
|
||||
char info_size[] = {'I', 'N', 'F', 'O', ':', 's','i','z','e','[',
|
||||
('0' + ((SIZE / 10000)%10)),
|
||||
('0' + ((SIZE / 1000)%10)),
|
||||
('0' + ((SIZE / 100)%10)),
|
||||
('0' + ((SIZE / 10)%10)),
|
||||
('0' + (SIZE % 10)),
|
||||
']',
|
||||
#ifdef KEY
|
||||
' ','k','e','y','[', KEY, ']',
|
||||
#endif
|
||||
'\0'};
|
||||
|
||||
#ifdef __CLASSIC_C__
|
||||
int main(argc, argv) int argc; char *argv[];
|
||||
#else
|
||||
int main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
int require = 0;
|
||||
require += info_size[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
|
@ -1,268 +0,0 @@
|
|||
# Copied from master branch of CMake (commit SHA 34a49dea) and
|
||||
# modified to use CheckIncludeFileCXX instead of CheckIncludeFile
|
||||
# when the LANGUAGE is CXX. Modified the try_compile call to
|
||||
# not pass any LINK_LIBRARIES as this option is only supported by
|
||||
# CMake since version 2.8.11
|
||||
# -andreas
|
||||
|
||||
#.rst:
|
||||
# CheckTypeSize
|
||||
# -------------
|
||||
#
|
||||
# Check sizeof a type
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# CHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY]
|
||||
# [LANGUAGE <language>])
|
||||
#
|
||||
# Check if the type exists and determine its size. On return,
|
||||
# "HAVE_${VARIABLE}" holds the existence of the type, and "${VARIABLE}"
|
||||
# holds one of the following:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# <size> = type has non-zero size <size>
|
||||
# "0" = type has arch-dependent size (see below)
|
||||
# "" = type does not exist
|
||||
#
|
||||
# Furthermore, the variable "${VARIABLE}_CODE" holds C preprocessor code
|
||||
# to define the macro "${VARIABLE}" to the size of the type, or leave
|
||||
# the macro undefined if the type does not exist.
|
||||
#
|
||||
# The variable "${VARIABLE}" may be "0" when CMAKE_OSX_ARCHITECTURES has
|
||||
# multiple architectures for building OS X universal binaries. This
|
||||
# indicates that the type size varies across architectures. In this
|
||||
# case "${VARIABLE}_CODE" contains C preprocessor tests mapping from
|
||||
# each architecture macro to the corresponding type size. The list of
|
||||
# architecture macros is stored in "${VARIABLE}_KEYS", and the value for
|
||||
# each key is stored in "${VARIABLE}-${KEY}".
|
||||
#
|
||||
# If the BUILTIN_TYPES_ONLY option is not given, the macro checks for
|
||||
# headers <sys/types.h>, <stdint.h>, and <stddef.h>, and saves results
|
||||
# in HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H. The type size
|
||||
# check automatically includes the available headers, thus supporting
|
||||
# checks of types defined in the headers.
|
||||
#
|
||||
# If LANGUAGE is set, the specified compiler will be used to perform the
|
||||
# check. Acceptable values are C and CXX
|
||||
#
|
||||
# Despite the name of the macro you may use it to check the size of more
|
||||
# complex expressions, too. To check e.g. for the size of a struct
|
||||
# member you can do something like this:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# check_type_size("((struct something*)0)->member" SIZEOF_MEMBER)
|
||||
#
|
||||
#
|
||||
#
|
||||
# The following variables may be set before calling this macro to modify
|
||||
# the way the check is run:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
|
||||
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
|
||||
# CMAKE_REQUIRED_INCLUDES = list of include directories
|
||||
# CMAKE_EXTRA_INCLUDE_FILES = list of extra headers to include
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include(CheckIncludeFile)
|
||||
include(CheckIncludeFileCXX)
|
||||
|
||||
cmake_policy(PUSH)
|
||||
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
||||
|
||||
get_filename_component(__check_type_size_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Helper function. DO NOT CALL DIRECTLY.
|
||||
function(__check_type_size_impl type var map builtin language)
|
||||
message(STATUS "Check size of ${type}")
|
||||
|
||||
# Include header files.
|
||||
set(headers)
|
||||
if(builtin)
|
||||
if(HAVE_SYS_TYPES_H)
|
||||
set(headers "${headers}#include <sys/types.h>\n")
|
||||
endif()
|
||||
if(HAVE_STDINT_H)
|
||||
set(headers "${headers}#include <stdint.h>\n")
|
||||
endif()
|
||||
if(HAVE_STDDEF_H)
|
||||
set(headers "${headers}#include <stddef.h>\n")
|
||||
endif()
|
||||
endif()
|
||||
foreach(h ${CMAKE_EXTRA_INCLUDE_FILES})
|
||||
set(headers "${headers}#include \"${h}\"\n")
|
||||
endforeach()
|
||||
|
||||
# Perform the check.
|
||||
|
||||
if("${language}" STREQUAL "C")
|
||||
set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.c)
|
||||
elseif("${language}" STREQUAL "CXX")
|
||||
set(src ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.cpp)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown language:\n ${language}\nSupported languages: C, CXX.\n")
|
||||
endif()
|
||||
set(bin ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${var}.bin)
|
||||
configure_file(${__check_type_size_dir}/CheckTypeSize.c.in ${src} @ONLY)
|
||||
try_compile(HAVE_${var} ${CMAKE_BINARY_DIR} ${src}
|
||||
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
|
||||
CMAKE_FLAGS
|
||||
"-DCOMPILE_DEFINITIONS:STRING=${CMAKE_REQUIRED_FLAGS}"
|
||||
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}"
|
||||
OUTPUT_VARIABLE output
|
||||
COPY_FILE ${bin}
|
||||
)
|
||||
|
||||
if(HAVE_${var})
|
||||
# The check compiled. Load information from the binary.
|
||||
file(STRINGS ${bin} strings LIMIT_COUNT 10 REGEX "INFO:size")
|
||||
|
||||
# Parse the information strings.
|
||||
set(regex_size ".*INFO:size\\[0*([^]]*)\\].*")
|
||||
set(regex_key " key\\[([^]]*)\\]")
|
||||
set(keys)
|
||||
set(code)
|
||||
set(mismatch)
|
||||
set(first 1)
|
||||
foreach(info ${strings})
|
||||
if("${info}" MATCHES "${regex_size}")
|
||||
# Get the type size.
|
||||
string(REGEX REPLACE "${regex_size}" "\\1" size "${info}")
|
||||
if(first)
|
||||
set(${var} ${size})
|
||||
elseif(NOT "${size}" STREQUAL "${${var}}")
|
||||
set(mismatch 1)
|
||||
endif()
|
||||
set(first 0)
|
||||
|
||||
# Get the architecture map key.
|
||||
string(REGEX MATCH "${regex_key}" key "${info}")
|
||||
string(REGEX REPLACE "${regex_key}" "\\1" key "${key}")
|
||||
if(key)
|
||||
set(code "${code}\nset(${var}-${key} \"${size}\")")
|
||||
list(APPEND keys ${key})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Update the architecture-to-size map.
|
||||
if(mismatch AND keys)
|
||||
configure_file(${__check_type_size_dir}/CheckTypeSizeMap.cmake.in ${map} @ONLY)
|
||||
set(${var} 0)
|
||||
else()
|
||||
file(REMOVE ${map})
|
||||
endif()
|
||||
|
||||
if(mismatch AND NOT keys)
|
||||
message(SEND_ERROR "CHECK_TYPE_SIZE found different results, consider setting CMAKE_OSX_ARCHITECTURES or CMAKE_TRY_COMPILE_OSX_ARCHITECTURES to one or no architecture !")
|
||||
endif()
|
||||
|
||||
message(STATUS "Check size of ${type} - done")
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
|
||||
"Determining size of ${type} passed with the following output:\n${output}\n\n")
|
||||
set(${var} "${${var}}" CACHE INTERNAL "CHECK_TYPE_SIZE: sizeof(${type})")
|
||||
else()
|
||||
# The check failed to compile.
|
||||
message(STATUS "Check size of ${type} - failed")
|
||||
file(READ ${src} content)
|
||||
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining size of ${type} failed with the following output:\n${output}\n${src}:\n${content}\n\n")
|
||||
set(${var} "" CACHE INTERNAL "CHECK_TYPE_SIZE: ${type} unknown")
|
||||
file(REMOVE ${map})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
macro(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||
# parse arguments
|
||||
unset(doing)
|
||||
foreach(arg ${ARGN})
|
||||
if("x${arg}" STREQUAL "xBUILTIN_TYPES_ONLY")
|
||||
set(_CHECK_TYPE_SIZE_${arg} 1)
|
||||
unset(doing)
|
||||
elseif("x${arg}" STREQUAL "xLANGUAGE") # change to MATCHES for more keys
|
||||
set(doing "${arg}")
|
||||
set(_CHECK_TYPE_SIZE_${doing} "")
|
||||
elseif("x${doing}" STREQUAL "xLANGUAGE")
|
||||
set(_CHECK_TYPE_SIZE_${doing} "${arg}")
|
||||
unset(doing)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown argument:\n ${arg}\n")
|
||||
endif()
|
||||
endforeach()
|
||||
if("x${doing}" MATCHES "^x(LANGUAGE)$")
|
||||
message(FATAL_ERROR "Missing argument:\n ${doing} arguments requires a value\n")
|
||||
endif()
|
||||
if(DEFINED _CHECK_TYPE_SIZE_LANGUAGE)
|
||||
if(NOT "x${_CHECK_TYPE_SIZE_LANGUAGE}" MATCHES "^x(C|CXX)$")
|
||||
message(FATAL_ERROR "Unknown language:\n ${_CHECK_TYPE_SIZE_LANGUAGE}.\nSupported languages: C, CXX.\n")
|
||||
endif()
|
||||
set(_language ${_CHECK_TYPE_SIZE_LANGUAGE})
|
||||
else()
|
||||
set(_language C)
|
||||
endif()
|
||||
|
||||
# Optionally check for standard headers.
|
||||
if(_CHECK_TYPE_SIZE_BUILTIN_TYPES_ONLY)
|
||||
set(_builtin 0)
|
||||
else()
|
||||
set(_builtin 1)
|
||||
if ("x${_CHECK_TYPE_SIZE_LANGUAGE}" STREQUAL "xCXX")
|
||||
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file_cxx(stdint.h HAVE_STDINT_H)
|
||||
check_include_file_cxx(stddef.h HAVE_STDDEF_H)
|
||||
else ()
|
||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file(stdint.h HAVE_STDINT_H)
|
||||
check_include_file(stddef.h HAVE_STDDEF_H)
|
||||
endif ()
|
||||
endif()
|
||||
unset(_CHECK_TYPE_SIZE_BUILTIN_TYPES_ONLY)
|
||||
unset(_CHECK_TYPE_SIZE_LANGUAGE)
|
||||
|
||||
# Compute or load the size or size map.
|
||||
set(${VARIABLE}_KEYS)
|
||||
set(_map_file ${CMAKE_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/CheckTypeSize/${VARIABLE}.cmake)
|
||||
if(NOT DEFINED HAVE_${VARIABLE})
|
||||
__check_type_size_impl(${TYPE} ${VARIABLE} ${_map_file} ${_builtin} ${_language})
|
||||
endif()
|
||||
include(${_map_file} OPTIONAL)
|
||||
set(_map_file)
|
||||
set(_builtin)
|
||||
|
||||
# Create preprocessor code.
|
||||
if(${VARIABLE}_KEYS)
|
||||
set(${VARIABLE}_CODE)
|
||||
set(_if if)
|
||||
foreach(key ${${VARIABLE}_KEYS})
|
||||
set(${VARIABLE}_CODE "${${VARIABLE}_CODE}#${_if} defined(${key})\n# define ${VARIABLE} ${${VARIABLE}-${key}}\n")
|
||||
set(_if elif)
|
||||
endforeach()
|
||||
set(${VARIABLE}_CODE "${${VARIABLE}_CODE}#else\n# error ${VARIABLE} unknown\n#endif")
|
||||
set(_if)
|
||||
elseif(${VARIABLE})
|
||||
set(${VARIABLE}_CODE "#define ${VARIABLE} ${${VARIABLE}}")
|
||||
else()
|
||||
set(${VARIABLE}_CODE "/* #undef ${VARIABLE} */")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
cmake_policy(POP)
|
|
@ -1 +0,0 @@
|
|||
set(@var@_KEYS "@keys@")@code@
|
|
@ -1,181 +0,0 @@
|
|||
#.rst:
|
||||
# FindThreads
|
||||
# -----------
|
||||
#
|
||||
# This module determines the thread library of the system.
|
||||
#
|
||||
# The following variables are set
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# CMAKE_THREAD_LIBS_INIT - the thread library
|
||||
# CMAKE_USE_SPROC_INIT - are we using sproc?
|
||||
# CMAKE_USE_WIN32_THREADS_INIT - using WIN32 threads?
|
||||
# CMAKE_USE_PTHREADS_INIT - are we using pthreads
|
||||
# CMAKE_HP_PTHREADS_INIT - are we using hp pthreads
|
||||
#
|
||||
# For systems with multiple thread libraries, caller can set
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# CMAKE_THREAD_PREFER_PTHREAD
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2002-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
include (CheckIncludeFileCXX)
|
||||
include (CheckCXXLibraryExists)
|
||||
include (CheckCXXSymbolExists)
|
||||
set(Threads_FOUND FALSE)
|
||||
|
||||
|
||||
# Do we have sproc?
|
||||
if(CMAKE_SYSTEM MATCHES IRIX AND NOT CMAKE_THREAD_PREFER_PTHREAD)
|
||||
CHECK_INCLUDE_FILES_CXX("sys/types.h;sys/prctl.h" CMAKE_HAVE_SPROC_H)
|
||||
endif()
|
||||
|
||||
if(CMAKE_HAVE_SPROC_H AND NOT CMAKE_THREAD_PREFER_PTHREAD)
|
||||
# We have sproc
|
||||
set(CMAKE_USE_SPROC_INIT 1)
|
||||
else()
|
||||
# Do we have pthreads?
|
||||
CHECK_INCLUDE_FILE_CXX("pthread.h" CMAKE_HAVE_PTHREAD_H)
|
||||
if(CMAKE_HAVE_PTHREAD_H)
|
||||
|
||||
#
|
||||
# We have pthread.h
|
||||
# Let's check for the library now.
|
||||
#
|
||||
set(CMAKE_HAVE_THREADS_LIBRARY)
|
||||
if(NOT THREADS_HAVE_PTHREAD_ARG)
|
||||
# Check if pthread functions are in normal C library
|
||||
CHECK_CXX_SYMBOL_EXISTS(pthread_create pthread.h CMAKE_HAVE_LIBC_CREATE)
|
||||
if(CMAKE_HAVE_LIBC_CREATE)
|
||||
set(CMAKE_THREAD_LIBS_INIT "")
|
||||
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||
set(Threads_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_HAVE_THREADS_LIBRARY)
|
||||
# Do we have -lpthreads
|
||||
CHECK_CXX_LIBRARY_EXISTS(pthreads pthread_create "" CMAKE_HAVE_PTHREADS_CREATE)
|
||||
if(CMAKE_HAVE_PTHREADS_CREATE)
|
||||
set(CMAKE_THREAD_LIBS_INIT "-lpthreads")
|
||||
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||
set(Threads_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
# Ok, how about -lpthread
|
||||
CHECK_CXX_LIBRARY_EXISTS(pthread pthread_create "" CMAKE_HAVE_PTHREAD_CREATE)
|
||||
if(CMAKE_HAVE_PTHREAD_CREATE)
|
||||
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
|
||||
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||
set(Threads_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "SunOS.*")
|
||||
# On sun also check for -lthread
|
||||
CHECK_CXX_LIBRARY_EXISTS(thread thr_create "" CMAKE_HAVE_THR_CREATE)
|
||||
if(CMAKE_HAVE_THR_CREATE)
|
||||
set(CMAKE_THREAD_LIBS_INIT "-lthread")
|
||||
set(CMAKE_HAVE_THREADS_LIBRARY 1)
|
||||
set(Threads_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_HAVE_THREADS_LIBRARY)
|
||||
# If we did not found -lpthread, -lpthreads, or -lthread, look for -pthread
|
||||
if("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
|
||||
message(STATUS "Check if compiler accepts -pthread")
|
||||
configure_file ("${CMAKE_CURRENT_LIST_DIR}/CheckForPthreads.cxx"
|
||||
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckForPthreads.cxx" COPYONLY)
|
||||
try_run(THREADS_PTHREAD_ARG THREADS_HAVE_PTHREAD_ARG
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckForPthreads.cxx
|
||||
CMAKE_FLAGS "-DLINK_LIBRARIES:STRING=-pthread;-DCMAKE_CXX_FLAGS:STRING=-fpermissive"
|
||||
COMPILE_OUTPUT_VARIABLE OUTPUT)
|
||||
|
||||
if(THREADS_HAVE_PTHREAD_ARG)
|
||||
if(THREADS_PTHREAD_ARG STREQUAL "2")
|
||||
set(Threads_FOUND TRUE)
|
||||
message(STATUS "Check if compiler accepts -pthread - yes")
|
||||
else()
|
||||
message(STATUS "Check if compiler accepts -pthread - no")
|
||||
file(APPEND
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if compiler accepts -pthread returned ${THREADS_PTHREAD_ARG} instead of 2. The compiler had the following output:\n${OUTPUT}\n\n")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "Check if compiler accepts -pthread - no")
|
||||
file(APPEND
|
||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
|
||||
"Determining if compiler accepts -pthread failed with the following output:\n${OUTPUT}\n\n")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
if(THREADS_HAVE_PTHREAD_ARG)
|
||||
set(Threads_FOUND TRUE)
|
||||
set(CMAKE_THREAD_LIBS_INIT "-pthread")
|
||||
endif()
|
||||
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE)
|
||||
set(CMAKE_USE_PTHREADS_INIT 1)
|
||||
set(Threads_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "Windows")
|
||||
set(CMAKE_USE_WIN32_THREADS_INIT 1)
|
||||
set(Threads_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(CMAKE_USE_PTHREADS_INIT)
|
||||
if(CMAKE_SYSTEM MATCHES "HP-UX-*")
|
||||
# Use libcma if it exists and can be used. It provides more
|
||||
# symbols than the plain pthread library. CMA threads
|
||||
# have actually been deprecated:
|
||||
# http://docs.hp.com/en/B3920-90091/ch12s03.html#d0e11395
|
||||
# http://docs.hp.com/en/947/d8.html
|
||||
# but we need to maintain compatibility here.
|
||||
# The CMAKE_HP_PTHREADS setting actually indicates whether CMA threads
|
||||
# are available.
|
||||
CHECK_CXX_LIBRARY_EXISTS(cma pthread_attr_create "" CMAKE_HAVE_HP_CMA)
|
||||
if(CMAKE_HAVE_HP_CMA)
|
||||
set(CMAKE_THREAD_LIBS_INIT "-lcma")
|
||||
set(CMAKE_HP_PTHREADS_INIT 1)
|
||||
set(Threads_FOUND TRUE)
|
||||
endif()
|
||||
set(CMAKE_USE_PTHREADS_INIT 1)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "OSF1-V*")
|
||||
set(CMAKE_USE_PTHREADS_INIT 0)
|
||||
set(CMAKE_THREAD_LIBS_INIT )
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
|
||||
set(CMAKE_USE_PTHREADS_INIT 1)
|
||||
set(Threads_FOUND TRUE)
|
||||
set(CMAKE_THREAD_LIBS_INIT )
|
||||
set(CMAKE_USE_WIN32_THREADS_INIT 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND)
|
|
@ -46,7 +46,9 @@ endfunction ()
|
|||
function (configure_headers out)
|
||||
set (tmp)
|
||||
foreach (src IN LISTS ARGN)
|
||||
if (EXISTS "${PROJECT_SOURCE_DIR}/src/${src}.in")
|
||||
if (IS_ABSOLUTE "${src}")
|
||||
list (APPEND tmp "${src}")
|
||||
elseif (EXISTS "${PROJECT_SOURCE_DIR}/src/${src}.in")
|
||||
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 ()
|
||||
|
|
|
@ -269,7 +269,7 @@ the getopt library, but has much less overhead to use. In fact, it's
|
|||
just a single function call:</p>
|
||||
|
||||
<pre>
|
||||
google::ParseCommandLineFlags(&argc, &argv, true);
|
||||
gflags::ParseCommandLineFlags(&argc, &argv, true);
|
||||
</pre>
|
||||
|
||||
<p>Usually, this code is at the beginning of <code>main()</code>.
|
||||
|
@ -529,8 +529,8 @@ access parts of <code>argv</code> outside main, including the program
|
|||
name (<code>argv[0]</code>).</p>
|
||||
|
||||
<p>For more information about these routines, and other useful helper
|
||||
methods such as <code>google::SetUsageMessage()</code> and
|
||||
<code>google::SetVersionString</code>, see <code>gflags.h</code>.</p>
|
||||
methods such as <code>gflags::SetUsageMessage()</code> and
|
||||
<code>gflags::SetVersionString</code>, see <code>gflags.h</code>.</p>
|
||||
|
||||
|
||||
<h2> <A name="misc">Miscellaneous Notes</code> </h2>
|
|
@ -70,9 +70,6 @@
|
|||
// Define to the address where bug reports for this package should be sent.
|
||||
#define PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@
|
||||
|
||||
// Namespace of gflags library symbols.
|
||||
#define GFLAGS_NAMESPACE @GFLAGS_NAMESPACE@
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Path separator
|
||||
#ifndef PATH_SEPARATOR
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
namespace @GFLAGS_NAMESPACE@ {
|
||||
namespace GFLAGS_NAMESPACE {
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
@ -136,7 +136,7 @@ extern GFLAGS_DLL_DECL bool RegisterFlagValidator(const std::string* flag, bool
|
|||
// Convenience macro for the registration of a flag validator
|
||||
#define DEFINE_validator(name, validator) \
|
||||
static const bool name##_validator_registered = \
|
||||
@GFLAGS_NAMESPACE@::RegisterFlagValidator(&FLAGS_##name, validator)
|
||||
GFLAGS_NAMESPACE::RegisterFlagValidator(&FLAGS_##name, validator)
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
@ -442,7 +442,7 @@ class GFLAGS_DLL_DECL FlagRegisterer {
|
|||
extern GFLAGS_DLL_DECL const char kStrippedFlagHelp[];
|
||||
|
||||
|
||||
} // namespace @GFLAGS_NAMESPACE@
|
||||
} // namespace GFLAGS_NAMESPACE
|
||||
|
||||
|
||||
#ifndef SWIG // In swig, ignore the main flag declarations
|
||||
|
@ -450,7 +450,7 @@ extern GFLAGS_DLL_DECL const char kStrippedFlagHelp[];
|
|||
#if defined(STRIP_FLAG_HELP) && STRIP_FLAG_HELP > 0
|
||||
// Need this construct to avoid the 'defined but not used' warning.
|
||||
#define MAYBE_STRIPPED_HELP(txt) \
|
||||
(false ? (txt) : @GFLAGS_NAMESPACE@::kStrippedFlagHelp)
|
||||
(false ? (txt) : GFLAGS_NAMESPACE::kStrippedFlagHelp)
|
||||
#else
|
||||
#define MAYBE_STRIPPED_HELP(txt) txt
|
||||
#endif
|
||||
|
@ -472,7 +472,7 @@ extern GFLAGS_DLL_DECL const char kStrippedFlagHelp[];
|
|||
/* We always want to export defined variables, dll or no */ \
|
||||
GFLAGS_DLL_DEFINE_FLAG type FLAGS_##name = FLAGS_nono##name; \
|
||||
type FLAGS_no##name = FLAGS_nono##name; \
|
||||
static @GFLAGS_NAMESPACE@::FlagRegisterer o_##name( \
|
||||
static GFLAGS_NAMESPACE::FlagRegisterer o_##name( \
|
||||
#name, #type, MAYBE_STRIPPED_HELP(help), __FILE__, \
|
||||
&FLAGS_##name, &FLAGS_no##name); \
|
||||
} \
|
||||
|
@ -500,20 +500,20 @@ GFLAGS_DLL_DECL bool IsBoolFlag(bool from);
|
|||
#define DEFINE_bool(name, val, txt) \
|
||||
namespace fLB { \
|
||||
typedef ::fLB::CompileAssert FLAG_##name##_value_is_not_a_bool[ \
|
||||
(sizeof(::fLB::IsBoolFlag(val)) != sizeof(double)) ? 1 : -1]; \
|
||||
(sizeof(::fLB::IsBoolFlag(val)) != sizeof(double))? 1: -1]; \
|
||||
} \
|
||||
DEFINE_VARIABLE(bool, B, name, val, txt)
|
||||
|
||||
#define DEFINE_int32(name, val, txt) \
|
||||
DEFINE_VARIABLE(@GFLAGS_NAMESPACE@::int32, I, \
|
||||
DEFINE_VARIABLE(GFLAGS_NAMESPACE::int32, I, \
|
||||
name, val, txt)
|
||||
|
||||
#define DEFINE_int64(name, val, txt) \
|
||||
DEFINE_VARIABLE(@GFLAGS_NAMESPACE@::int64, I64, \
|
||||
DEFINE_VARIABLE(GFLAGS_NAMESPACE::int64, I64, \
|
||||
name, val, txt)
|
||||
|
||||
#define DEFINE_uint64(name,val, txt) \
|
||||
DEFINE_VARIABLE(@GFLAGS_NAMESPACE@::uint64, U64, \
|
||||
DEFINE_VARIABLE(GFLAGS_NAMESPACE::uint64, U64, \
|
||||
name, val, txt)
|
||||
|
||||
#define DEFINE_double(name, val, txt) \
|
||||
|
@ -554,7 +554,7 @@ inline clstring* dont_pass0toDEFINE_string(char *stringspot,
|
|||
clstring* const FLAGS_no##name = ::fLS:: \
|
||||
dont_pass0toDEFINE_string(s_##name[0].s, \
|
||||
val); \
|
||||
static @GFLAGS_NAMESPACE@::FlagRegisterer o_##name( \
|
||||
static GFLAGS_NAMESPACE::FlagRegisterer o_##name( \
|
||||
#name, "string", MAYBE_STRIPPED_HELP(txt), __FILE__, \
|
||||
s_##name[0].s, new (s_##name[1].s) clstring(*FLAGS_no##name)); \
|
||||
extern GFLAGS_DLL_DEFINE_FLAG clstring& FLAGS_##name; \
|
||||
|
@ -565,4 +565,8 @@ inline clstring* dont_pass0toDEFINE_string(char *stringspot,
|
|||
|
||||
#endif // SWIG
|
||||
|
||||
|
||||
@INCLUDE_GFLAGS_NS_H@
|
||||
|
||||
|
||||
#endif // GFLAGS_GFLAGS_H_
|
||||
|
|
|
@ -37,6 +37,11 @@
|
|||
#ifndef GFLAGS_DECLARE_H_
|
||||
#define GFLAGS_DECLARE_H_
|
||||
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Namespace of gflags library symbols.
|
||||
#define GFLAGS_NAMESPACE @GFLAGS_NAMESPACE@
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Windows DLL import/export.
|
||||
|
||||
|
@ -69,7 +74,7 @@
|
|||
# include <inttypes.h> // a third place for uint32_t or u_int32_t
|
||||
#endif
|
||||
|
||||
namespace @GFLAGS_NAMESPACE@ {
|
||||
namespace GFLAGS_NAMESPACE {
|
||||
|
||||
#if @GFLAGS_INTTYPES_FORMAT_C99@ // C99
|
||||
typedef int32_t int32;
|
||||
|
@ -90,7 +95,7 @@ typedef unsigned __int64 uint64;
|
|||
# error Do not know how to define a 32-bit integer quantity on your system
|
||||
#endif
|
||||
|
||||
} // namespace @GFLAGS_NAMESPACE@
|
||||
} // namespace GFLAGS_NAMESPACE
|
||||
|
||||
|
||||
namespace fLS {
|
||||
|
@ -113,13 +118,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)
|
||||
|
|
101
src/gflags_ns.h.in
Normal file
101
src/gflags_ns.h.in
Normal file
|
@ -0,0 +1,101 @@
|
|||
// Copyright (c) 2014, Andreas Schuh
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Imports the gflags library symbols into an alternative/deprecated namespace.
|
||||
|
||||
#ifndef GFLAGS_GFLAGS_H_
|
||||
# error The internal header gflags_@ns@.h may only be included by gflags.h
|
||||
#endif
|
||||
|
||||
#ifndef GFLAGS_NS_@NS@_H_
|
||||
#define GFLAGS_NS_@NS@_H_
|
||||
|
||||
|
||||
namespace @ns@ {
|
||||
|
||||
|
||||
using GFLAGS_NAMESPACE::int32;
|
||||
using GFLAGS_NAMESPACE::uint32;
|
||||
using GFLAGS_NAMESPACE::int64;
|
||||
using GFLAGS_NAMESPACE::uint64;
|
||||
|
||||
using GFLAGS_NAMESPACE::RegisterFlagValidator;
|
||||
using GFLAGS_NAMESPACE::CommandLineFlagInfo;
|
||||
using GFLAGS_NAMESPACE::GetAllFlags;
|
||||
using GFLAGS_NAMESPACE::ShowUsageWithFlags;
|
||||
using GFLAGS_NAMESPACE::ShowUsageWithFlagsRestrict;
|
||||
using GFLAGS_NAMESPACE::DescribeOneFlag;
|
||||
using GFLAGS_NAMESPACE::SetArgv;
|
||||
using GFLAGS_NAMESPACE::GetArgvs;
|
||||
using GFLAGS_NAMESPACE::GetArgv;
|
||||
using GFLAGS_NAMESPACE::GetArgv0;
|
||||
using GFLAGS_NAMESPACE::GetArgvSum;
|
||||
using GFLAGS_NAMESPACE::ProgramInvocationName;
|
||||
using GFLAGS_NAMESPACE::ProgramInvocationShortName;
|
||||
using GFLAGS_NAMESPACE::ProgramUsage;
|
||||
using GFLAGS_NAMESPACE::VersionString;
|
||||
using GFLAGS_NAMESPACE::GetCommandLineOption;
|
||||
using GFLAGS_NAMESPACE::GetCommandLineFlagInfo;
|
||||
using GFLAGS_NAMESPACE::GetCommandLineFlagInfoOrDie;
|
||||
using GFLAGS_NAMESPACE::FlagSettingMode;
|
||||
using GFLAGS_NAMESPACE::SET_FLAGS_VALUE;
|
||||
using GFLAGS_NAMESPACE::SET_FLAG_IF_DEFAULT;
|
||||
using GFLAGS_NAMESPACE::SET_FLAGS_DEFAULT;
|
||||
using GFLAGS_NAMESPACE::SetCommandLineOption;
|
||||
using GFLAGS_NAMESPACE::SetCommandLineOptionWithMode;
|
||||
using GFLAGS_NAMESPACE::FlagSaver;
|
||||
using GFLAGS_NAMESPACE::CommandlineFlagsIntoString;
|
||||
using GFLAGS_NAMESPACE::ReadFlagsFromString;
|
||||
using GFLAGS_NAMESPACE::AppendFlagsIntoFile;
|
||||
using GFLAGS_NAMESPACE::ReadFromFlagsFile;
|
||||
using GFLAGS_NAMESPACE::BoolFromEnv;
|
||||
using GFLAGS_NAMESPACE::Int32FromEnv;
|
||||
using GFLAGS_NAMESPACE::Int64FromEnv;
|
||||
using GFLAGS_NAMESPACE::Uint64FromEnv;
|
||||
using GFLAGS_NAMESPACE::DoubleFromEnv;
|
||||
using GFLAGS_NAMESPACE::StringFromEnv;
|
||||
using GFLAGS_NAMESPACE::SetUsageMessage;
|
||||
using GFLAGS_NAMESPACE::SetVersionString;
|
||||
using GFLAGS_NAMESPACE::ParseCommandLineNonHelpFlags;
|
||||
using GFLAGS_NAMESPACE::HandleCommandLineHelpFlags;
|
||||
using GFLAGS_NAMESPACE::AllowCommandLineReparsing;
|
||||
using GFLAGS_NAMESPACE::ReparseCommandLineNonHelpFlags;
|
||||
using GFLAGS_NAMESPACE::ShutDownCommandLineFlags;
|
||||
using GFLAGS_NAMESPACE::FlagRegisterer;
|
||||
|
||||
#ifndef SWIG
|
||||
using GFLAGS_NAMESPACE::ParseCommandLineFlags;
|
||||
#endif
|
||||
|
||||
|
||||
} // namespace @ns@
|
||||
|
||||
|
||||
#endif // GFLAGS_NS_@NS@_H_
|
Loading…
Add table
Reference in a new issue