Remove Activ libs and includes
This commit is contained in:
1 parent
28ed30c944
commit
4b718994be
10967 files changed
-2306716
No files matched your search
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* @file include/ActivMiddleware/Config/Compilers/Clang.h
|
||||
*
|
||||
* @brief Clang configuration file.
|
||||
*/
|
||||
|
||||
#if (!defined ACTIV_CONFIG_COMPILERS_CLANG_H)
|
||||
#define ACTIV_CONFIG_COMPILERS_CLANG_H
|
||||
|
||||
#if (defined ACTIV_PLATFORM_OSX)
|
||||
|
||||
#if ((ACTIV_CLANG_COMPILER_VERSION < ACTIV_MAKE_CLANG_COMPILER_VERSION(5, 0)) || \
|
||||
(ACTIV_CLANG_COMPILER_VERSION > ACTIV_MAKE_CLANG_COMPILER_VERSION(9, 0)))
|
||||
#error Clang version not supported
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if ((ACTIV_CLANG_COMPILER_VERSION < ACTIV_MAKE_CLANG_COMPILER_VERSION(2, 0)) || \
|
||||
(ACTIV_CLANG_COMPILER_VERSION > ACTIV_MAKE_CLANG_COMPILER_VERSION(17, 0)))
|
||||
#error Clang version not supported
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if (!defined ACTIV_COMPILER_NAME)
|
||||
#if (defined __VERSION__)
|
||||
#define ACTIV_COMPILER_NAME "Clang " __clang_version__ " (g++ " __VERSION__ ")"
|
||||
#else
|
||||
#define ACTIV_COMPILER_NAME "Clang " __clang_version__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (!defined ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND)
|
||||
// Clang will warn in pre-C++11, but allow it. GCC solution doesn't work at all.
|
||||
#define ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND(T) friend T
|
||||
#endif
|
||||
|
||||
#if (defined __GNUC__)
|
||||
|
||||
// GCC-like frontend.
|
||||
#define ACTIV_COMPILER_GCC ACTIV_COMPILER_GCC_TAG
|
||||
|
||||
#include "GCC.h"
|
||||
|
||||
#else
|
||||
#error Configure Clang support.
|
||||
#endif
|
||||
|
||||
#endif // (!defined ACTIV_CONFIG_COMPILERS_CLANG_H)
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* @file include/ActivMiddleware/Config/Compilers/Emcc.h
|
||||
*
|
||||
* @brief Emscripten configuration file.
|
||||
*/
|
||||
|
||||
#if (!defined ACTIV_CONFIG_COMPILERS_EMCC_H)
|
||||
#define ACTIV_CONFIG_COMPILERS_EMCC_H
|
||||
|
||||
#if (!defined ACTIV_COMPILER_NAME)
|
||||
#if (defined __VERSION__)
|
||||
#define ACTIV_COMPILER_NAME "emcc " ACTIV_STRINGIZE(__EMSCRIPTEN_major__) "." ACTIV_STRINGIZE(__EMSCRIPTEN_minor__) \
|
||||
" (" __VERSION__ ")"
|
||||
#else
|
||||
#define ACTIV_COMPILER_NAME "emcc " ACTIV_STRINGIZE(__EMSCRIPTEN_major__) "." ACTIV_STRINGIZE(__EMSCRIPTEN_minor__)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (defined __clang__)
|
||||
|
||||
// clang-like.
|
||||
#define ACTIV_COMLILER_CLANG ACTIV_COMPILER_CLANG_TAG
|
||||
|
||||
#define ACTIV_EXPLICIT_INSTANTIATE_SIZE_T
|
||||
|
||||
#include "Clang.h"
|
||||
|
||||
#else
|
||||
|
||||
#error Configure emcc support
|
||||
|
||||
#endif
|
||||
|
||||
#endif // (!defined ACTIV_CONFIG_COMPILERS_EMCC_H)
|
||||
@@ -1,161 +0,0 @@
|
||||
/**
|
||||
* @file include/ActivMiddleware/Config/Compilers/GCC.h
|
||||
*
|
||||
* @brief GNU C++ configuration file.
|
||||
*/
|
||||
|
||||
#if (!defined ACTIV_CONFIG_COMPILERS_GCC_H)
|
||||
#define ACTIV_CONFIG_COMPILERS_GCC_H
|
||||
|
||||
#if (!defined ACTIV_COMPILER_CLANG && !defined ACTIV_COMPILER_EMCC && (ACTIV_GCC_COMPILER_VERSION < ACTIV_MAKE_GCC_COMPILER_VERSION(4, 3)))
|
||||
#error GCC version not supported
|
||||
#endif
|
||||
|
||||
#if (!defined ACTIV_COMPILER_NAME)
|
||||
#define ACTIV_COMPILER_NAME "GNU C++ " __VERSION__
|
||||
#endif
|
||||
|
||||
#if (!defined ACTIV_PLATFORM_WINDOWS)
|
||||
#define ACTIV_BUILDING_DLL_EXPORTED_API __attribute__ ((visibility("default")))
|
||||
#define ACTIV_BUILDING_DLL_INLINE_API __attribute__ ((visibility("hidden")))
|
||||
#define ACTIV_BUILDING_DLL_LOCAL_API __attribute__ ((visibility("hidden")))
|
||||
#define ACTIV_USING_DLL_EXPORTED_API
|
||||
#define ACTIV_USING_DLL_INLINE_API
|
||||
#define ACTIV_USING_DLL_LOCAL_API
|
||||
#else
|
||||
#define ACTIV_BUILDING_DLL_EXPORTED_API
|
||||
#define ACTIV_BUILDING_DLL_INLINE_API
|
||||
#define ACTIV_BUILDING_DLL_LOCAL_API
|
||||
#define ACTIV_USING_DLL_EXPORTED_API
|
||||
#define ACTIV_USING_DLL_INLINE_API
|
||||
#define ACTIV_USING_DLL_LOCAL_API
|
||||
#endif
|
||||
|
||||
#define ACTIV_BUILDING_LIB_EXPORTED_API
|
||||
#define ACTIV_BUILDING_LIB_INLINE_API
|
||||
#define ACTIV_BUILDING_LIB_LOCAL_API
|
||||
#define ACTIV_USING_LIB_EXPORTED_API
|
||||
#define ACTIV_USING_LIB_INLINE_API
|
||||
#define ACTIV_USING_LIB_LOCAL_API
|
||||
|
||||
/**
|
||||
* @brief Define rules for exporting template member functions.
|
||||
*
|
||||
* The Intel & Visual C++ compilers have different rules for __declspec exporting template
|
||||
* instantiations from dlls. Use ACTIV_TEMPLATE_API as a workaround, e.g.
|
||||
*
|
||||
* class Example
|
||||
* {
|
||||
* template \<typename T\>
|
||||
* ACTIV_TEMPLATE_API(MY_LIB_API) void Fn(T &);
|
||||
* };
|
||||
*
|
||||
* @param a __declspec macro, e.g. ACTIV_BASE_API.
|
||||
*/
|
||||
#define ACTIV_TEMPLATE_API(a) a
|
||||
|
||||
#if (!defined ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND)
|
||||
#if (ACTIV_GCC_COMPILER_VERSION >= ACTIV_MAKE_GCC_COMPILER_VERSION(4, 7))
|
||||
#define ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND(T) friend T
|
||||
#else
|
||||
namespace Activ
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
class GccFriendWorkaround
|
||||
{
|
||||
public:
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
} // namespace Activ
|
||||
#define ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND(T) friend class ::Activ::GccFriendWorkaround<T>::type
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//! Ensure a function is always inlined.
|
||||
#if (defined _DEBUG)
|
||||
#define ACTIV_FORCE_INLINE inline
|
||||
#else
|
||||
#define ACTIV_FORCE_INLINE inline __attribute__((__always_inline__))
|
||||
#endif
|
||||
|
||||
//! Ensure a function is never inlined.
|
||||
#define ACTIV_NEVER_INLINE __attribute__((__noinline__))
|
||||
|
||||
/**
|
||||
* @brief Specify that a function is a printf style function.
|
||||
*
|
||||
* @param type printf, scanf, strftime.
|
||||
* @param formatIndex for static or global functions, the 1-based index of the parameter containing the format specifier string.
|
||||
* For member functions, the 2-based index.
|
||||
* @param firstParameterIndex for static or global functions, the 1-based index of the parameter containing the first value to be
|
||||
* used by the format string. For member functions, the 2-based index.
|
||||
* Use 0 if the function takes a va_list of parameters.
|
||||
*/
|
||||
#define ACTIV_PRINTF_FUNCTION(type, formatIndex, firstParameterIndex) \
|
||||
__attribute__ ((format (type, formatIndex, firstParameterIndex)))
|
||||
|
||||
#define stricmp strcasecmp
|
||||
#define strnicmp strncasecmp
|
||||
|
||||
/**
|
||||
* @brief Give a hint that a switch case statement is likely.
|
||||
*
|
||||
* Usage:
|
||||
* switch (ACTIV_LIKELY_SWITCH_CASE(variable, 0))
|
||||
* {
|
||||
* case 0: <-- the expected case.
|
||||
* case 1:
|
||||
* ...
|
||||
* default:
|
||||
* }
|
||||
*
|
||||
* If the expected case statement is not present then default is the likely case.
|
||||
*
|
||||
* @param expr the expression under test.
|
||||
* @param expected the expected value of expr.
|
||||
*
|
||||
* @return expr
|
||||
*/
|
||||
#define ACTIV_LIKELY_SWITCH_CASE(expr, expected) __builtin_expect(expr, expected)
|
||||
|
||||
/**
|
||||
* @brief Give a hint that an expression is @a likely to be true.
|
||||
*
|
||||
* @param expr
|
||||
*/
|
||||
#define ACTIV_LIKELY(expr) __builtin_expect(!!(expr), 1)
|
||||
|
||||
/**
|
||||
* @brief Give a hint that an expression is @a unlikely to be true.
|
||||
*
|
||||
* @param expr
|
||||
*/
|
||||
#define ACTIV_UNLIKELY(expr) __builtin_expect(!!(expr), 0)
|
||||
|
||||
// TODO: add _DEBUG case counting mispredicted cases.
|
||||
|
||||
//! Mark a function with the hot attribute.
|
||||
#define ACTIV_HOT __attribute__ ((hot))
|
||||
|
||||
//! Mark a function with the cold attribute.
|
||||
#define ACTIV_COLD __attribute__ ((cold))
|
||||
|
||||
// Pragma push/pop were added in gcc 4.6 but gcc < 5.0 has a bug where the "padded" warning is left enabled after the pop, see
|
||||
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59304.
|
||||
// Only apply padding warnings on 64 bit.
|
||||
#if (ACTIV_GCC_COMPILER_VERSION >= ACTIV_MAKE_GCC_COMPILER_VERSION(5, 0)) && (ACTIV_PROCESSOR_WORD_SIZE == 64)
|
||||
|
||||
//! Start enablement of compiler error on struct padding.
|
||||
#define ACTIV_ENABLE_ERROR_ON_PADDING_START \
|
||||
_Pragma("GCC diagnostic push") \
|
||||
_Pragma("GCC diagnostic error \"-Wpadded\"")
|
||||
|
||||
//! End enablement of compiler error on struct padding.
|
||||
#define ACTIV_ENABLE_ERROR_ON_PADDING_END \
|
||||
_Pragma("GCC diagnostic pop")
|
||||
|
||||
#endif // (ACTIV_GCC_COMPILER_VERSION >= ACTIV_MAKE_GCC_COMPILER_VERSION(5, 0))
|
||||
|
||||
#endif // (!defined ACTIV_CONFIG_COMPILERS_GCC_H)
|
||||
@@ -1,76 +0,0 @@
|
||||
/**
|
||||
* @file include/ActivMiddleware/Config/Compilers/Intel.h
|
||||
*
|
||||
* @brief Intel C++ Compiler configuration file.
|
||||
*/
|
||||
|
||||
#if (!defined ACTIV_CONFIG_COMPILERS_INTEL_H)
|
||||
#define ACTIV_CONFIG_COMPILERS_INTEL_H
|
||||
|
||||
#if (__INTEL_COMPILER < 1310) || (__INTEL_COMPILER > 1400)
|
||||
#error Intel compiler version not supported
|
||||
#endif
|
||||
|
||||
#if (defined __GNUC__)
|
||||
|
||||
#if (!defined ACTIV_COMPILER_NAME)
|
||||
#define ACTIV_COMPILER_NAME "Intel C++ Compiler " ACTIV_STRINGIZE(__INTEL_COMPILER) " (g++ " ACTIV_STRINGIZE(__GNUC__) "." \
|
||||
ACTIV_STRINGIZE(__GNUC_MINOR__) ")"
|
||||
#endif
|
||||
|
||||
// GCC-like frontend.
|
||||
#define ACTIV_COMPILER_GCC ACTIV_COMPILER_GCC_TAG
|
||||
|
||||
// "warning #858: type qualifier on return type is meaningless".
|
||||
#pragma warning(disable:858)
|
||||
|
||||
// "warning #1170: invalid redeclaration of nested class".
|
||||
#pragma warning(disable:1170)
|
||||
|
||||
#include "GCC.h"
|
||||
|
||||
#else
|
||||
|
||||
#define ACTIV_BUILDING_DLL_EXPORTED_API __declspec (dllexport)
|
||||
#define ACTIV_BUILDING_DLL_INLINE_API
|
||||
#define ACTIV_BUILDING_DLL_LOCAL_API
|
||||
#define ACTIV_USING_DLL_EXPORTED_API __declspec (dllimport)
|
||||
#define ACTIV_USING_DLL_INLINE_API
|
||||
#define ACTIV_USING_DLL_LOCAL_API
|
||||
|
||||
#define ACTIV_BUILDING_LIB_EXPORTED_API
|
||||
#define ACTIV_BUILDING_LIB_INLINE_API
|
||||
#define ACTIV_BUILDING_LIB_LOCAL_API
|
||||
#define ACTIV_USING_LIB_EXPORTED_API
|
||||
#define ACTIV_USING_LIB_INLINE_API
|
||||
#define ACTIV_USING_LIB_LOCAL_API
|
||||
|
||||
/**
|
||||
* @brief Define rules for exporting template member functions.
|
||||
*
|
||||
* The Intel & Visual C++ compilers have different rules for __declspec exporting template
|
||||
* instantiations from dlls. Use ACTIV_TEMPLATE_API as a workaround, e.g.
|
||||
*
|
||||
* class Example
|
||||
* {
|
||||
* template \<typename T\>
|
||||
* ACTIV_TEMPLATE_API(MY_LIB_API) void Fn(T &);
|
||||
* };
|
||||
*
|
||||
* @param a __declspec macro, e.g. ACTIV_BASE_API.
|
||||
*/
|
||||
#define ACTIV_TEMPLATE_API(a)
|
||||
|
||||
#if (!defined ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND)
|
||||
#define ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND(T) friend T
|
||||
#endif
|
||||
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
|
||||
// "C4355: 'this' : used in base member initializer list"
|
||||
#pragma warning(disable:4355)
|
||||
|
||||
#endif // (defined __GNUC__)
|
||||
|
||||
#endif // (!defined ACTIV_CONFIG_COMPILERS_INTEL_H)
|
||||
@@ -1,70 +0,0 @@
|
||||
/**
|
||||
* @file include/ActivMiddleware/Config/Compilers/SunPro.h
|
||||
*
|
||||
* @brief SunPro C++ configuration file.
|
||||
*/
|
||||
|
||||
#if (!defined ACTIV_CONFIG_COMPILERS_SUN_PRO_H)
|
||||
#define ACTIV_CONFIG_COMPILERS_SUN_PRO_H
|
||||
|
||||
#if (__SUNPRO_CC < 0x512)
|
||||
#error SunPro version not supported
|
||||
#endif
|
||||
|
||||
#define ACTIV_COMPILER_NAME "SunPro C++ " ACTIV_STRINGIZE(__SUNPRO_CC)
|
||||
|
||||
#define ACTIV_BUILDING_DLL_EXPORTED_API
|
||||
#define ACTIV_BUILDING_DLL_INLINE_API
|
||||
#define ACTIV_BUILDING_DLL_LOCAL_API
|
||||
#define ACTIV_USING_DLL_EXPORTED_API
|
||||
#define ACTIV_USING_DLL_INLINE_API
|
||||
#define ACTIV_USING_DLL_LOCAL_API
|
||||
|
||||
#define ACTIV_BUILDING_LIB_EXPORTED_API
|
||||
#define ACTIV_BUILDING_LIB_INLINE_API
|
||||
#define ACTIV_BUILDING_LIB_LOCAL_API
|
||||
#define ACTIV_USING_LIB_EXPORTED_API
|
||||
#define ACTIV_USING_LIB_INLINE_API
|
||||
#define ACTIV_USING_LIB_LOCAL_API
|
||||
|
||||
#if (defined ACTIV_PROCESSOR_X86_64)
|
||||
#define ACTIV_EXPLICIT_INSTANTIATE_SIZE_T
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Define rules for exporting template member functions.
|
||||
*
|
||||
* The Intel & Visual C++ compilers have different rules for __declspec exporting template
|
||||
* instantiations from dlls. Use ACTIV_TEMPLATE_API as a workaround, e.g.
|
||||
*
|
||||
* class Example
|
||||
* {
|
||||
* template \<typename T\>
|
||||
* ACTIV_TEMPLATE_API(MY_LIB_API) void Fn(T &);
|
||||
* };
|
||||
*
|
||||
* @param a __declspec macro, e.g. ACTIV_BASE_API.
|
||||
*/
|
||||
#define ACTIV_TEMPLATE_API(a)
|
||||
|
||||
/**
|
||||
* @brief Ensure a function is always inlined.
|
||||
*/
|
||||
#define ACTIV_FORCE_INLINE inline
|
||||
|
||||
/**
|
||||
* @brief Ensure a function is never inlined.
|
||||
*/
|
||||
#define ACTIV_NEVER_INLINE
|
||||
|
||||
#define _XOPEN_SOURCE
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#define __EXTENSIONS__
|
||||
#define _POSIX_PTHREAD_SEMANTICS
|
||||
|
||||
#define __FUNCTION__ __func__
|
||||
|
||||
#define stricmp strcasecmp
|
||||
#define strnicmp strncasecmp
|
||||
|
||||
#endif // (!defined ACTIV_CONFIG_COMPILERS_SUN_PRO_H)
|
||||
@@ -1,118 +0,0 @@
|
||||
/**
|
||||
* @file include/ActivMiddleware/Config/Compilers/VisualC.h
|
||||
*
|
||||
* @brief Microsoft Visual C++ configuration file.
|
||||
*/
|
||||
|
||||
#if (!defined ACTIV_CONFIG_COMPILERS_VISUAL_C_H)
|
||||
#define ACTIV_CONFIG_COMPILERS_VISUAL_C_H
|
||||
|
||||
static_assert(ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(11, 0) == 1700, "ACTIV_MAKE_VISUAL_C_COMPILER_VERSION incorrect for vc110");
|
||||
static_assert(ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(12, 0) == 1800, "ACTIV_MAKE_VISUAL_C_COMPILER_VERSION incorrect for vc120");
|
||||
static_assert(ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(14, 0) == 1900, "ACTIV_MAKE_VISUAL_C_COMPILER_VERSION incorrect for vc140");
|
||||
static_assert(ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(14, 1) == 1910, "ACTIV_MAKE_VISUAL_C_COMPILER_VERSION incorrect for vc141");
|
||||
static_assert(ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(14, 2) == 1920, "ACTIV_MAKE_VISUAL_C_COMPILER_VERSION incorrect for vc142");
|
||||
static_assert(ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(14, 3) == 1930, "ACTIV_MAKE_VISUAL_C_COMPILER_VERSION incorrect for vc143");
|
||||
|
||||
#if (ACTIV_VISUAL_C_COMPILER_VERSION < 1910) || (ACTIV_VISUAL_C_COMPILER_VERSION >= 1940)
|
||||
#error VC++ version not supported. Check the behavior of ACTIV_MAKE_VISUAL_C_COMPILER_VERSION when adding a new compiler version.
|
||||
#endif
|
||||
|
||||
#define ACTIV_COMPILER_NAME "Microsoft C++ " ACTIV_STRINGIZE(ACTIV_VISUAL_C_COMPILER_VERSION)
|
||||
|
||||
#define ACTIV_BUILDING_DLL_EXPORTED_API __declspec (dllexport)
|
||||
#define ACTIV_BUILDING_DLL_INLINE_API
|
||||
#define ACTIV_BUILDING_DLL_LOCAL_API
|
||||
#define ACTIV_USING_DLL_EXPORTED_API __declspec (dllimport)
|
||||
#define ACTIV_USING_DLL_INLINE_API
|
||||
#define ACTIV_USING_DLL_LOCAL_API
|
||||
|
||||
#define ACTIV_BUILDING_LIB_EXPORTED_API
|
||||
#define ACTIV_BUILDING_LIB_INLINE_API
|
||||
#define ACTIV_BUILDING_LIB_LOCAL_API
|
||||
#define ACTIV_USING_LIB_EXPORTED_API
|
||||
#define ACTIV_USING_LIB_INLINE_API
|
||||
#define ACTIV_USING_LIB_LOCAL_API
|
||||
|
||||
/**
|
||||
* @brief Define rules for exporting template member functions.
|
||||
*
|
||||
* The Intel & Visual C++ compilers have different rules for __declspec exporting template
|
||||
* instantiations from dlls. Use ACTIV_TEMPLATE_API as a workaround, e.g.
|
||||
*
|
||||
* class Example
|
||||
* {
|
||||
* template \<typename T\>
|
||||
* ACTIV_TEMPLATE_API(MY_LIB_API) void Fn(T &);
|
||||
* };
|
||||
*
|
||||
* @param a __declspec macro, e.g. ACTIV_BASE_API.
|
||||
*/
|
||||
#define ACTIV_TEMPLATE_API(a) a
|
||||
|
||||
#if (!defined ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND)
|
||||
#define ACTIV_DECLARE_TEMPLATE_PARAMETER_FRIEND(T) friend T
|
||||
#endif
|
||||
|
||||
//! Ensure a function is always inlined.
|
||||
#define ACTIV_FORCE_INLINE __forceinline
|
||||
|
||||
//! Ensure a function is never inlined.
|
||||
#define ACTIV_NEVER_INLINE __declspec(noinline)
|
||||
|
||||
#define ACTIV_HAS_INTTYPES_H
|
||||
|
||||
// Turn off annoying "C4355: 'this' : used in base member initializer list" warning.
|
||||
#pragma warning(disable:4355)
|
||||
|
||||
// Turn off annoying "C4163: not available as an intrinsic function" warning.
|
||||
#pragma warning(disable:4163)
|
||||
|
||||
// Turn off annoying "C4996: : 'blah' was declared deprecated" warning.
|
||||
#pragma warning(disable:4996)
|
||||
|
||||
// Turn off annoying "warning C4258: 'iter' : definition from the for loop is ignored..." warning.
|
||||
#pragma warning(disable:4258)
|
||||
|
||||
// Turn off annoying "warning C4309: 'static_cast' : truncation of constant value" warning.
|
||||
#pragma warning(disable:4309)
|
||||
|
||||
#if (ACTIV_VISUAL_C_COMPILER_VERSION < ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(14, 2))
|
||||
// VS2015, VS2017: Bug in dbghelp.h. "warning C4091: 'typedef ': ignored on left of '' when no variable is declared".
|
||||
#pragma warning(disable:4091)
|
||||
#endif
|
||||
|
||||
#if (!defined _CRT_SECURE_NO_DEPRECATE)
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
#if (defined _M_CEE)
|
||||
// nullptr has issues with /CLR.
|
||||
#define ACTIV_NULLPTR __nullptr
|
||||
#endif
|
||||
|
||||
#if (defined _MSVC_LANG)
|
||||
// __cplusplus is always 199711L unless the /Zc:__cplusplus compiler option is enabled.
|
||||
// Use ACTIV_CPLUSPLUS instead.
|
||||
#define ACTIV_CPLUSPLUS _MSVC_LANG
|
||||
#else
|
||||
// Assume version is large enough for C++11.
|
||||
#define ACTIV_CPLUSPLUS ACTIV_CPLUSPLUS_11
|
||||
#endif
|
||||
|
||||
// It seems that _Pragma is not available in vc141.
|
||||
// Only apply padding warnings on 64 bit.
|
||||
#if (ACTIV_VISUAL_C_COMPILER_VERSION >= ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(14, 2)) && (ACTIV_PROCESSOR_WORD_SIZE == 64)
|
||||
|
||||
//! Start enablement of compiler error on struct padding.
|
||||
#define ACTIV_ENABLE_ERROR_ON_PADDING_START \
|
||||
_Pragma("warning(push)") \
|
||||
_Pragma("warning(error:4820)")
|
||||
|
||||
//! End enablement of compiler error on struct padding.
|
||||
#define ACTIV_ENABLE_ERROR_ON_PADDING_END \
|
||||
_Pragma("warning(pop)")
|
||||
|
||||
#endif // (ACTIV_VISUAL_C_COMPILER_VERSION >= ACTIV_MAKE_VISUAL_C_COMPILER_VERSION(14, 2)) && (ACTIV_PROCESSOR_WORD_SIZE == 64)
|
||||
|
||||
#endif // (!defined ACTIV_CONFIG_COMPILERS_VISUAL_C_H)
|
||||
Reference in new issue
Block a user