Skip to content

Latest commit

 

History

History
112 lines (96 loc) · 4.17 KB

File metadata and controls

112 lines (96 loc) · 4.17 KB

Compilers

Source

src/compilers.h

Content

__has_xxx_compiler__

Type of __has_xxx_compiler__

macro

Description of __has_xxx_compiler__

1 if there is a corresponding compiler, otherwise 0.

The 'xxx' here refers to the compiler name, and details can be found in the src/compilers.h source code.

Note: An environment may contain multiple compiler environments, so multiple compiler macros may be defined at the same time. e.g. __has_gcc_compiler__, __has_clang_compiler__.

Compiler List

Compiler Macro
ACC __has_acc_compiler__
Altium MicroBlaze C __has_has_altium_microblaze_c_compiler__
Altium C-to-Hardware __has_altium_c_to_hardware_compiler__
Amsterdam Compiler Kit __has_amsterdam_compiler__
ARM Compiler __has_arm_compiler__
Aztec C __has_aztec_c_compiler__
Borland C/C++ __has_borland_compiler__
CC65 __has_cc65_compiler__
Clang __has_clang_compiler__
Comeau __has_comeau_compiler__
Compaq C/C++ __has_compaq_compiler__
Convex C __has_convex_c_compiler__
CompCert __has_compcert_compiler__
Coverity C/C++ Static Analyzer __has_coverity_compiler__
Cray C __has_cray_c_compiler__
Diab C/C++ __has_diab_compiler__
DICE C __has_dice_c_compiler__
Digital Mars __has_digital_mars_compiler__
Dignus Systems/C++ __has_dignus_systems_compiler__
DJGPP __has_djgpp_compiler__
EDG C++ Frontend __has_edg_compiler__
EKOPath __has_ekopath_compiler__
Fujitsu C++ __has_fujitsu_compiler__
GCC C/C++ __has_gcc_compiler__
Green Hill C/C++ __has_greenhill_compiler__
HP ANSI C __has_hpansi_c_compiler__
HP aC++ __has_hpa_compiler__
IAR C/C++ __has_iar_compiler__
ImageCraft C __has_imagecraft_c_compiler__
Intel C/C++ __has_intel_compiler__
KAI C++ __has_kai_compiler__
KEIL CARM __has_keil_carm_compiler__
KEIL C166 __has_keil_c166_compiler__
KEIL C51 __has_keil_c51_compiler__
LCC __has_lcc_compiler__
LLVM __has_llvm_compiler__
MetaWare High C/C++ __has_metaware_high_compiler__
Metrowerks CodeWarrior __has_metrowerks_codewarrior_compiler__
Microsoft Visual C++ __has_msvc_compiler__
Microtec C/C++ __has_microtec_compiler__
Microway NDP C __has_microway_ndp_c_compiler__
MinGW __has_mingw_compiler__
MIPSpro __has_mipspro_compiler__
Miracle C __has_miracle_c_compiler__
MPW C++ __has_mpr_compiler__
Norcroft C __has_norcroft_c_compiler__
NWCC __has_nwcc_compiler__
Open64 __has_open64_compiler__
Oracle Pro*C Precompiler __has_oracle_pro_compiler__
Oracle Solaris Studio __has_oracle_solaris_studio_compiler__
Pacific C __has_pacific_c_compiler__
Palm C/C++ __has_palm_compiler__
Pelles C __has_pelles_c_compiler__
Portland Group C/C++ __has_portland_group_compiler__
Renesas C/C++ __has_renesas_compiler__
SAS/C __has_sas_c_compiler__
SCO OpenServer __has_sco_compiler__
Small Device C Compiler __has_small_device_compiler__
SN Compiler __has_sn_compiler__
Stratus VOS C __has_stratus_vos_c_compiler__
Symantec C++ __has_symantec_compiler__
TenDRA C/C++ __has_tendra_compiler__
Texas Instruments C/C++ Compiler __has_texas_instruments_compiler__
THINK C __has_think_c_compiler__
Tiny C __has_tiny_c_compiler__
Turbo C/C++ __has_turboc_compiler__
Ultimate C/C++ __has_ultimate_compiler__
USL C __has_usl_c_compiler__
VBCC __has_vbcc_compiler__
Watcom C++ __has_watcom_compiler__
Zortech C++ __has_zortech_compiler__

Example of __has_xxx_compiler__

#include <cppp/cppp-platform.h>

#if __has_msvc_compiler__
#error "This project do not support MSVC!"
#endif

int main()
{
    return 0;
}