MCC
Loading...
Searching...
No Matches
MCC_BuildSettings.h
1#ifndef MCC_BUILD_SETTINGS_H
2#define MCC_BUILD_SETTINGS_H
3
4// The libraries this one depends on. Including them from their src root
5// lets the Arduino builder find them from any header of this library.
6#include <Foundation_BuildSettings.h>
7
8#ifndef MCC_VERSION
9 #define MCC_VERSION "0.6.2"
10#endif
11
12#ifndef MCC_CPLUSPLUS
13 #if defined(_MSVC_LANG)
14 #define MCC_CPLUSPLUS _MSVC_LANG
15 #elif defined(__cplusplus)
16 #define MCC_CPLUSPLUS __cplusplus
17 #else
18 #define MCC_CPLUSPLUS 0L
19 #endif
20#endif
21
22#if !defined(DOXYGEN) && defined(ARDUINO) && (MCC_CPLUSPLUS < 201103L)
23 #error "MCC requires C++11 or newer for Arduino source builds"
24#elif !defined(DOXYGEN) && !defined(ARDUINO) && (MCC_CPLUSPLUS < 201703L)
25 #error "MCC requires C++17 or newer"
26#endif
27
28// C++14 relaxed constexpr permits local variables, branches, and loops.
29// Preserve constexpr evaluation on modern toolchains and expose the same API
30// as ordinary inline functions to stock Arduino cores that compile as C++11.
31#ifndef MCC_CONSTEXPR14
32 #if MCC_CPLUSPLUS >= 201402L
33 #define MCC_CONSTEXPR14 constexpr
34 #else
35 #define MCC_CONSTEXPR14 inline
36 #endif
37#endif
38
39#endif // MCC_BUILD_SETTINGS_H