2014-09-14 11:04:27 +00:00
|
|
|
#pragma once
|
2014-05-20 16:17:56 +00:00
|
|
|
// settings for crow
|
2014-05-20 22:30:51 +00:00
|
|
|
// TODO - replace with runtime config. libucl?
|
2014-05-20 16:17:56 +00:00
|
|
|
|
|
|
|
/* #ifdef - enables debug mode */
|
2017-09-17 17:58:53 +00:00
|
|
|
//#define CROW_ENABLE_DEBUG
|
2014-05-20 16:17:56 +00:00
|
|
|
|
|
|
|
/* #ifdef - enables logging */
|
2014-05-20 22:30:51 +00:00
|
|
|
#define CROW_ENABLE_LOGGING
|
|
|
|
|
2016-08-28 05:46:31 +00:00
|
|
|
/* #ifdef - enables ssl */
|
2015-09-20 13:06:00 +00:00
|
|
|
//#define CROW_ENABLE_SSL
|
|
|
|
|
2021-11-22 14:39:48 +00:00
|
|
|
/* #ifdef - enforces section 5.2 and 6.1 of RFC6455 (only accepting masked messages from clients) */
|
|
|
|
//#define CROW_ENFORCE_WS_SPEC
|
|
|
|
|
2014-05-20 22:30:51 +00:00
|
|
|
/* #define - specifies log level */
|
|
|
|
/*
|
2016-08-27 05:15:16 +00:00
|
|
|
Debug = 0
|
|
|
|
Info = 1
|
|
|
|
Warning = 2
|
|
|
|
Error = 3
|
|
|
|
Critical = 4
|
2014-09-12 03:16:37 +00:00
|
|
|
|
|
|
|
default to INFO
|
2014-05-20 22:30:51 +00:00
|
|
|
*/
|
2017-12-24 15:40:39 +00:00
|
|
|
#ifndef CROW_LOG_LEVEL
|
2014-09-12 03:16:37 +00:00
|
|
|
#define CROW_LOG_LEVEL 1
|
2017-12-24 15:40:39 +00:00
|
|
|
#endif
|
2015-02-20 02:47:23 +00:00
|
|
|
|
2020-11-10 20:56:27 +00:00
|
|
|
#ifndef CROW_STATIC_DIRECTORY
|
|
|
|
#define CROW_STATIC_DIRECTORY "static/"
|
|
|
|
#endif
|
|
|
|
#ifndef CROW_STATIC_ENDPOINT
|
|
|
|
#define CROW_STATIC_ENDPOINT "/static/<path>"
|
|
|
|
#endif
|
|
|
|
|
2015-02-20 02:47:23 +00:00
|
|
|
// compiler flags
|
2021-02-08 16:25:02 +00:00
|
|
|
#if defined(_MSVC_LANG) && _MSVC_LANG >= 201402L
|
|
|
|
#define CROW_CAN_USE_CPP14
|
|
|
|
#endif
|
2015-02-20 02:47:23 +00:00
|
|
|
#if __cplusplus >= 201402L
|
|
|
|
#define CROW_CAN_USE_CPP14
|
|
|
|
#endif
|
2021-10-31 19:25:11 +00:00
|
|
|
|
|
|
|
#if defined(_MSVC_LANG) && _MSVC_LANG >= 201703L
|
|
|
|
#define CROW_CAN_USE_CPP17
|
|
|
|
#endif
|
2021-10-31 18:19:44 +00:00
|
|
|
#if __cplusplus >= 201703L
|
|
|
|
#define CROW_CAN_USE_CPP17
|
|
|
|
#endif
|
2015-02-20 02:47:23 +00:00
|
|
|
|
|
|
|
#if defined(_MSC_VER)
|
|
|
|
#if _MSC_VER < 1900
|
|
|
|
#define CROW_MSVC_WORKAROUND
|
|
|
|
#define constexpr const
|
|
|
|
#define noexcept throw()
|
|
|
|
#endif
|
|
|
|
#endif
|
2021-11-23 15:00:14 +00:00
|
|
|
|
2021-11-25 14:14:45 +00:00
|
|
|
#if __GNUC__ == 8 && __GNUC_MINOR__ < 4
|
|
|
|
#if __cplusplus > 201103L
|
|
|
|
#define CROW_GCC83_WORKAROUND
|
|
|
|
#else
|
2021-11-25 14:16:34 +00:00
|
|
|
#warning "GCC 8.1 - 8.3 has a bug that prevents crow from compiling with C++11. Please update GCC to > 8.3 or use C++ > 11."
|
2021-11-25 14:14:45 +00:00
|
|
|
#endif
|
2021-11-23 15:00:14 +00:00
|
|
|
#endif
|