Jiale/test2_ort/lite/lite.ai.defs.h

38 lines
1.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Created by DefTruth on 2021/7/17.
//
//define 了常见的宏LITE_EXPORTS LITE_WIN32 NOMAXMIN __unused 等
#ifndef LITE_AI_LITE_AI_DEFS_H
#define LITE_AI_LITE_AI_DEFS_H
#include <iostream>
#ifndef LITE_EXPORTS
# if (defined _WIN32 || defined WINCE || defined __CYGWIN__)
# define LITE_EXPORTS __declspec(dllexport) // __declspec(dllexport) 指示编译器将函数或变量导出到动态链接库DLL
# elif defined __GNUC__ && __GNUC__ >= 4 && (defined(__APPLE__)) // &&是二元运算符 defined是一元运算符,从左往右按需计算
# define LITE_EXPORTS __attribute__ ((visibility ("default")))
# endif
#endif
#if (defined _WIN32 || defined WINCE || defined __CYGWIN__)
# define LITE_WIN32
#elif defined __GNUC__ && __GNUC__ >= 4 && (defined(__APPLE__))
# define LITE_UNIX
#endif
#ifdef LITE_WIN32
# define NOMINMAX // 用在#include<windows.h>之前用于禁止min/max宏定义
#endif
#ifndef LITE_EXPORTS
# define LITE_EXPORTS
#endif
#ifndef __unused
# define __unused
#endif
#endif //LITE_AI_LITE_AI_DEFS_H