From ea6144e243c106544ec068fc08ef14fb1e1644c4 Mon Sep 17 00:00:00 2001 From: Andreas Schuh Date: Fri, 25 Nov 2016 12:35:39 +0000 Subject: [PATCH] enh: Rename private sources, include public headers with rel path --- CMakeLists.txt | 4 ++-- src/{gflags_completions.cc => completions.cc} | 10 ++++------ src/gflags.cc | 2 +- src/gflags.h.in | 2 +- src/mutex.h | 2 +- src/{gflags_reporting.cc => reporting.cc} | 4 ++-- src/util.h | 1 + 7 files changed, 12 insertions(+), 13 deletions(-) rename src/{gflags_completions.cc => completions.cc} (99%) rename src/{gflags_reporting.cc => reporting.cc} (99%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fd9d70..ca7c147 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -350,8 +350,8 @@ set (PRIVATE_HDRS set (GFLAGS_SRCS "gflags.cc" - "gflags_reporting.cc" - "gflags_completions.cc" + "reporting.cc" + "completions.cc" ) if (OS_WINDOWS) diff --git a/src/gflags_completions.cc b/src/completions.cc similarity index 99% rename from src/gflags_completions.cc rename to src/completions.cc index 8fefa1b..875088d 100644 --- a/src/gflags_completions.cc +++ b/src/completions.cc @@ -46,11 +46,6 @@ // 5a) Force bash to place most-relevent groups at the top of the list // 5b) Trim most flag's descriptions to fit on a single terminal line - -#include "gflags_completions.h" - -#include "config.h" - #include #include #include // for strlen @@ -60,9 +55,12 @@ #include #include -#include "gflags.h" +#include "config.h" #include "util.h" +#include "gflags/gflags.h" +#include "gflags/gflags_completions.h" + using std::set; using std::string; using std::vector; diff --git a/src/gflags.cc b/src/gflags.cc index 42dcd04..bc62227 100644 --- a/src/gflags.cc +++ b/src/gflags.cc @@ -88,7 +88,7 @@ // are, similarly, mostly hooks into the functionality described above. #include "config.h" -#include "gflags.h" +#include "gflags/gflags.h" #include #include diff --git a/src/gflags.h.in b/src/gflags.h.in index 3732636..43b3f7a 100644 --- a/src/gflags.h.in +++ b/src/gflags.h.in @@ -81,7 +81,7 @@ #include #include -#include "gflags_declare.h" // IWYU pragma: export +#include "gflags/gflags_declare.h" // IWYU pragma: export // We always want to export variables defined in user code diff --git a/src/mutex.h b/src/mutex.h index ff96f2b..1648c2f 100644 --- a/src/mutex.h +++ b/src/mutex.h @@ -106,7 +106,7 @@ #ifndef GFLAGS_MUTEX_H_ #define GFLAGS_MUTEX_H_ -#include "gflags_declare.h" // to figure out pthreads support +#include "gflags/gflags_declare.h" // to figure out pthreads support #if defined(NO_THREADS) typedef int MutexType; // to keep a lock-count diff --git a/src/gflags_reporting.cc b/src/reporting.cc similarity index 99% rename from src/gflags_reporting.cc rename to src/reporting.cc index fb17059..7cc6691 100644 --- a/src/gflags_reporting.cc +++ b/src/reporting.cc @@ -56,8 +56,8 @@ #include #include "config.h" -#include "gflags.h" -#include "gflags_completions.h" +#include "gflags/gflags.h" +#include "gflags/gflags_completions.h" #include "util.h" diff --git a/src/util.h b/src/util.h index 164e3cf..e6b28cc 100644 --- a/src/util.h +++ b/src/util.h @@ -35,6 +35,7 @@ #define GFLAGS_UTIL_H_ #include "config.h" +#include "gflags/gflags_declare.h" // GFLAGS_NAMESPACE #include #ifdef HAVE_INTTYPES_H -- 2.7.4