From 418f9020e37a9079eb1bb8dd6e8e191b76274d1e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 20 Mar 2018 09:42:39 +0100 Subject: [PATCH] Fix redefined warnings from config.h The issue was caused by config.h header being included from both header files and implementation files. Proposed solution is to have regular header guard in the generated config.h. Benefit of this solution is that it's least intrusive. Downside is that it only solves issue for CMake build system, and autoconf one is not fixed since header template is automatically generated by autoheader who does not add header guard. --- src/config.h.cmake.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config.h.cmake.in b/src/config.h.cmake.in index e15c737..14924fa 100644 --- a/src/config.h.cmake.in +++ b/src/config.h.cmake.in @@ -1,3 +1,6 @@ +#ifndef GLOG_CONFIG_H +#define GLOG_CONFIG_H + /* define if glog doesn't use RTTI */ #cmakedefine DISABLE_RTTI @@ -200,3 +203,5 @@ #cmakedefine _START_GOOGLE_NAMESPACE_ ${_START_GOOGLE_NAMESPACE_} #endif + +#endif // GLOG_CONFIG_H