Commit 15bc2d6c authored by Andreas Schuh's avatar Andreas Schuh

Issue #73 Merge gflags_config.h into gflags_declare.h. Configuration of gflags.h no longer needed.

parent 70eac23c
......@@ -94,7 +94,6 @@ endif ()
# source files - excluding root subdirectory and/or .in suffix
set (PUBLIC_HDRS
"gflags.h"
"gflags_config.h"
"gflags_declare.h"
"gflags_completions.h"
)
......
......@@ -2,8 +2,6 @@
// Note: This header file is only used internally. It is not part of public interface!
#include "gflags_config.h"
// ---------------------------------------------------------------------------
// Additional meta-information
......
......@@ -81,7 +81,6 @@
#include <string>
#include <vector>
#include "gflags_config.h"
#include "gflags_declare.h" // IWYU pragma: export
......
/* Generated from gflags_config.h.in during build configuration using CMake. */
#ifndef GFLAGS_GFLAGS_CONFIG_H_
#define GFLAGS_GFLAGS_CONFIG_H_
// ---------------------------------------------------------------------------
// Meta-information
// Version number of gflags library.
#define GFLAGS_VERSION_STRING "@PACKAGE_VERSION@"
#define GFLAGS_VERSION_MAJOR @PACKAGE_VERSION_MAJOR@ ///< Major version number.
#define GFLAGS_VERSION_MINOR @PACKAGE_VERSION_MINOR@ ///< Minor version number.
#define GFLAGS_VERSION_PATCH @PACKAGE_VERSION_PATCH@ ///< Version patch number.
// Whether gflags library is shared. Used for DLL import declaration.
#cmakedefine GFLAGS_SHARED_LIBS
// ---------------------------------------------------------------------------
// Namespace for gflags symbols.
#define GFLAGS_NAMESPACE @GFLAGS_NAMESPACE@
// ---------------------------------------------------------------------------
// Unused attribute declaration for GNU GCC.
#define GFLAGS__ATTRIBUTE__UNUSED @GFLAGS__ATTRIBUTE_UNUSED@
// ---------------------------------------------------------------------------
// Windows DLL import/export.
#if defined(_MSC_VER) && defined(GFLAGS_SHARED_LIBS)
# ifdef GFLAGS_DLL_EXPORT
# define GFLAGS_DLL_DECL __declspec(dllexport)
# else
# define GFLAGS_DLL_DECL __declspec(dllimport)
# endif
#else
# define GFLAGS_DLL_DECL
#endif
// We always want to export defined variables, dll or no
#if defined(_MSC_VER)
# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport)
#else
# define GFLAGS_DLL_DEFINE_FLAG
#endif
// Export/import of STL class instantiations
// \sa http://support.microsoft.com/default.aspx?scid=KB;EN-US;168958
#if defined(GFLAGS_SHARED_LIBS) && defined(_MSC_VER) && _MSC_VER >= 1100
# ifdef GFLAGS_DLL_EXPORT
# define GFLAGS_EXTERN_STL
# else
# define GFLAGS_EXTERN_STL extern
# endif
#endif
#endif // GFLAGS_GFLAGS_CONFIG_H_
\ No newline at end of file
......@@ -37,10 +37,32 @@
#ifndef GFLAGS_DECLARE_H_
#define GFLAGS_DECLARE_H_
// ---------------------------------------------------------------------------
// Meta-information
#if !defined(GFLAGS_DLL_DECL)
# if defined(_MSC_VER)
# if defined(GFLAGS_DLL_EXPORT)
// Version number of gflags library.
#define GFLAGS_VERSION_STRING "@PACKAGE_VERSION@"
#define GFLAGS_VERSION_MAJOR @PACKAGE_VERSION_MAJOR@ ///< Major version number.
#define GFLAGS_VERSION_MINOR @PACKAGE_VERSION_MINOR@ ///< Minor version number.
#define GFLAGS_VERSION_PATCH @PACKAGE_VERSION_PATCH@ ///< Version patch number.
// Whether gflags library is shared. Used for DLL import declaration.
#cmakedefine GFLAGS_SHARED_LIBS
// ---------------------------------------------------------------------------
// Namespace for gflags symbols.
#define GFLAGS_NAMESPACE @GFLAGS_NAMESPACE@
// ---------------------------------------------------------------------------
// Unused attribute declaration for GNU GCC.
#define GFLAGS__ATTRIBUTE__UNUSED @GFLAGS__ATTRIBUTE_UNUSED@
// ---------------------------------------------------------------------------
// Windows DLL import/export.
#ifndef GFLAGS_DLL_DECL
# if defined(_MSC_VER) && defined(GFLAGS_SHARED_LIBS)
# ifdef GFLAGS_DLL_EXPORT
# define GFLAGS_DLL_DECL __declspec(dllexport)
# else
# define GFLAGS_DLL_DECL __declspec(dllimport)
......@@ -50,29 +72,45 @@
# endif
#endif
// We always want to export defined variables, dll or no
#if defined(_MSC_VER)
# define GFLAGS_DLL_DEFINE_FLAG __declspec(dllexport)
#else
# define GFLAGS_DLL_DEFINE_FLAG
#endif
// We always want to import declared variables, dll or no
#if !defined(GFLAGS_DLL_DECLARE_FLAG)
# if defined(_MSC_VER)
# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
#if defined(_MSC_VER)
# define GFLAGS_DLL_DECLARE_FLAG __declspec(dllimport)
#else
# define GFLAGS_DLL_DECLARE_FLAG
#endif
// Export/import of STL class instantiations
// \sa http://support.microsoft.com/default.aspx?scid=KB;EN-US;168958
#if defined(GFLAGS_SHARED_LIBS) && defined(_MSC_VER) && _MSC_VER >= 1100
# ifdef GFLAGS_DLL_EXPORT
# define GFLAGS_EXTERN_STL
# else
# define GFLAGS_DLL_DECLARE_FLAG
# define GFLAGS_EXTERN_STL extern
# endif
#endif
// ---------------------------------------------------------------------------
// Types
#include <string>
#if @HAVE_STDINT_H@
#include <stdint.h> // the normal place uint16_t is defined
# include <stdint.h> // the normal place uint16_t is defined
#endif
#if @HAVE_SYS_TYPES_H@
#include <sys/types.h> // the normal place u_int16_t is defined
# include <sys/types.h> // the normal place u_int16_t is defined
#endif
#if @HAVE_INTTYPES_H@
#include <inttypes.h> // a third place for uint16_t or u_int16_t
# include <inttypes.h> // a third place for uint16_t or u_int16_t
#endif
namespace @GFLAGS_NAMESPACE@ {
namespace GFLAGS_NAMESPACE {
#if @HAVE_uint16_t@ // the C99 format
typedef int32_t int32;
......@@ -93,7 +131,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 {
......
......@@ -40,6 +40,19 @@
#ifndef GFLAGS_WINDOWS_PORT_H_
#define GFLAGS_WINDOWS_PORT_H_
#ifndef GFLAGS_DLL_DECL
# if defined(_MSC_VER) && defined(GFLAGS_SHARED_LIBS)
# ifdef GFLAGS_DLL_EXPORT
# define GFLAGS_DLL_DECL __declspec(dllexport)
# else
# define GFLAGS_DLL_DECL __declspec(dllimport)
# endif
# else
# define GFLAGS_DLL_DECL
# endif
#endif
#ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN /* We always want minimal includes */
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment