VSF Documented
default_compiler_detect.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __DEFAULT_COMPILER_DETECT_H__
19#define __DEFAULT_COMPILER_DETECT_H__
20
22
25
26#ifdef __IS_COMPILER_LLVM__
27# undef __IS_COMPILER_LLVM__
28#endif
29#if defined(__clang__)
30# define __IS_COMPILER_LLVM__ 1
31#else
33#ifdef __IS_COMPILER_GCC__
34# undef __IS_COMPILER_GCC__
35#endif
36#if defined(__GNUC__) && !__IS_COMPILER_LLVM__
37# define __IS_COMPILER_GCC__ 1
38#else
40#ifdef __IS_COMPILER_TCC__
41# undef __IS_COMPILER_TCC__
42#endif
43#if defined(__TINYC__)
44# define __IS_COMPILER_TCC__ 1
45#endif
46#endif
47#endif
49
50#endif // __DEFAULT_COMPILER_DETECT_H__