From b63f27c0923a6758e5e5dbe2bc42e06a93049443 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 25 Oct 2011 22:03:07 +0000 Subject: Avoid recompiling everything on MSVC when BoxVersion.h changes. --- lib/common/BannerText.h | 6 +++++- lib/common/BoxPlatform.h | 2 +- lib/common/MainHelper.h | 5 +++++ lib/common/Utils.cpp | 6 +++++- lib/server/Daemon.cpp | 12 ++++++++---- 5 files changed, 24 insertions(+), 7 deletions(-) (limited to 'lib') diff --git a/lib/common/BannerText.h b/lib/common/BannerText.h index e40224da..f0772c9c 100644 --- a/lib/common/BannerText.h +++ b/lib/common/BannerText.h @@ -10,9 +10,13 @@ #ifndef BANNERTEXT__H #define BANNERTEXT__H +#ifdef NEED_BOX_VERSION_H +# include "BoxVersion.h" +#endif + #define BANNER_TEXT(UtilityName) \ "Box " UtilityName " v" BOX_VERSION ", (c) Ben Summers and " \ - "contributors 2003-2010" + "contributors 2003-2011" #endif // BANNERTEXT__H diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h index df77c310..53a967e8 100644 --- a/lib/common/BoxPlatform.h +++ b/lib/common/BoxPlatform.h @@ -23,7 +23,7 @@ #ifdef _MSC_VER #include "BoxConfig-MSVC.h" -#include "BoxVersion.h" +#define NEED_BOX_VERSION_H #else #include "BoxConfig.h" #endif diff --git a/lib/common/MainHelper.h b/lib/common/MainHelper.h index 3c973624..3c6e9ff0 100644 --- a/lib/common/MainHelper.h +++ b/lib/common/MainHelper.h @@ -12,6 +12,10 @@ #include +#ifdef NEED_BOX_VERSION_H +# include "BoxVersion.h" +#endif + #include "BoxException.h" #include "Logging.h" @@ -21,6 +25,7 @@ MEMLEAKFINDER_INIT \ MEMLEAKFINDER_START \ try { + #define MAINHELPER_END \ } catch(std::exception &e) { \ BOX_FATAL(e.what()); \ diff --git a/lib/common/Utils.cpp b/lib/common/Utils.cpp index 4f44ce0a..51bc3040 100644 --- a/lib/common/Utils.cpp +++ b/lib/common/Utils.cpp @@ -28,9 +28,13 @@ #include #endif -#include "Utils.h" +#ifdef NEED_BOX_VERSION_H +# include "BoxVersion.h" +#endif + #include "CommonException.h" #include "Logging.h" +#include "Utils.h" #include "MemLeakFindOn.h" diff --git a/lib/server/Daemon.cpp b/lib/server/Daemon.cpp index 668bffb5..dfd2150a 100644 --- a/lib/server/Daemon.cpp +++ b/lib/server/Daemon.cpp @@ -32,13 +32,17 @@ #include -#include "Daemon.h" +#ifdef NEED_BOX_VERSION_H +# include "BoxVersion.h" +#endif + #include "Configuration.h" -#include "ServerException.h" -#include "Guards.h" -#include "UnixUser.h" +#include "Daemon.h" #include "FileModificationTime.h" +#include "Guards.h" #include "Logging.h" +#include "ServerException.h" +#include "UnixUser.h" #include "Utils.h" #include "MemLeakFindOn.h" -- cgit v1.2.3