77 lines
2.1 KiB
C
77 lines
2.1 KiB
C
/**
|
|
* @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)
|