Change to the treatment of BeastConfig.h

* No longer requires its own compiler include path
* Includes use relative paths to locate the file
* Client applications include the file themselves
* Inclusion of BeastConfig.h can be controlled via preprocessor directive
This commit is contained in:
Vinnie Falco
2014-03-17 18:20:31 -07:00
parent d580e7c694
commit 18486169b3
47 changed files with 68 additions and 993 deletions

View File

@@ -17,7 +17,9 @@
*/
//==============================================================================
#include "BeastConfig.h"
#if BEAST_INCLUDE_BEASTCONFIG
#include "../../BeastConfig.h"
#endif
#include "system/OpenSSLIncludes.h"

View File

@@ -20,23 +20,6 @@
#ifndef BEAST_ASIO_MODULE_H_INCLUDED
#define BEAST_ASIO_MODULE_H_INCLUDED
//------------------------------------------------------------------------------
/* If you fail to make sure that all your compile units are building Beast with
the same set of option flags, then there's a risk that different compile
units will treat the classes as having different memory layouts, leading to
very nasty memory corruption errors when they all get linked together.
That's why it's best to always include the BeastConfig.h file before any
beast headers.
*/
#ifndef BEAST_BEASTCONFIG_H_INCLUDED
# ifdef _MSC_VER
# pragma message ("Have you included your BeastConfig.h file before including the Beast headers?")
# else
# warning "Have you included your BeastConfig.h file before including the Beast headers?"
# endif
#endif
// Must come before boost includes to fix the bost placeholders.
#include "../beast_core/beast_core.h"

View File

@@ -21,9 +21,9 @@
*/
//==============================================================================
// Your project must contain a BeastConfig.h file with your project-specific settings in it,
// and your header search path must make it accessible to the module's files.
#include "BeastConfig.h"
#if BEAST_INCLUDE_BEASTCONFIG
#include "../../BeastConfig.h"
#endif
//==============================================================================
#include "native/BasicNativeHeaders.h"
@@ -280,23 +280,5 @@ void beast_reportFatalError (char const* message, char const* fileName, int line
#pragma pop_macro("_aligned_msize")
#endif
//------------------------------------------------------------------------------
// When we compile the static library, which is really just for browsing the
// sources in the Visual Studio IDE, we want to compile each individual unity
// .cpp in order to make sure that it builds by itself. An application that
// uses beast will typically include all of these .cpp files in one of its
// own unity .cpp
#if ! BEAST_COMPILING_STATIC_LIBARARY
/*
#include "../../beast/chrono/Chrono.cpp"
#include "../../beast/crypto/Crypto.cpp"
#include "../../beast/http/HTTP.cpp"
#include "../../beast/net/Net.cpp"
#include "../../beast/strings/Strings.cpp"
#include "../../beast/utility/Utility.cpp"
*/
#endif
// Must be outside the namespace
#include "system/BoostPlaceholdersFix.cpp"

View File

@@ -17,7 +17,9 @@
*/
//==============================================================================
#include "BeastConfig.h"
#if BEAST_INCLUDE_BEASTCONFIG
#include "../../BeastConfig.h"
#endif
#include "beast_sqdb.h"

View File

@@ -23,7 +23,9 @@
@ingroup beast_sqlite
*/
#include "BeastConfig.h"
#if BEAST_INCLUDE_BEASTCONFIG
#include "../../BeastConfig.h"
#endif
// Prevents sqlite.h from being included, since it screws up the .c
#define BEAST_SQLITE_CPP_INCLUDED

View File

@@ -25,9 +25,6 @@
This external module provides the SQLite embedded database library.
SQLite is public domain software, visit http://sqlite.org
@note To control the use of the native SQLite library on supported platforms,
see BeastConfig.h.
*/
#include "../../beast/config/PlatformConfig.h"