plibsys 0.0.5
pmacroscompiler.h
Go to the documentation of this file.
1/*
2 * The MIT License
3 *
4 * Copyright (C) 2017-2024 Alexander Saprykin <saprykin.spb@gmail.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * 'Software'), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
39#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
40# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
41#endif
42
43#ifndef PLIBSYS_HEADER_PMACROSCOMPILER_H
44#define PLIBSYS_HEADER_PMACROSCOMPILER_H
45
46/*
47 * List of supported compilers (P_CC_x):
48 *
49 * MSVC - Microsoft Visual C/C++
50 * GNU - GNU C/C++
51 * MINGW - MinGW C/C++
52 * INTEL - Intel C/C++ (Classic)
53 * INTELX - Intel DPC++/C++
54 * CLANG - LLVM Clang C/C++
55 * SUN - Sun WorkShop/Studio C/C++
56 * XLC - IBM XL C/C++
57 * IXLC - IBM XL C/C++ (Clang-based)
58 * OXLC - IBM Open XL C/C++
59 * HP - HP C/aC++
60 * DEC - DEC C/C++
61 * MIPS - MIPSpro C/C++
62 * USLC - SCO OUDK and UDK C/C++
63 * WATCOM - Watcom C/C++
64 * BORLAND - Borland C/C++
65 * PGI - Portland Group C/C++
66 * CRAY - CRAY C/C++
67 * LCC - MCST C/C++
68 */
69
184#if defined(_MSC_VER)
185# define P_CC_MSVC
186# if defined(__INTEL_COMPILER)
187# define P_CC_INTEL
188# endif
189# if defined(__clang__)
190# define P_CC_CLANG
191# endif
192# if defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER)
193# define P_CC_INTELX
194# endif
195#elif defined(__GNUC__)
196# define P_CC_GNU
197# if defined(__MINGW32__)
198# define P_CC_MINGW
199# endif
200# if defined(__INTEL_COMPILER)
201# define P_CC_INTEL
202# endif
203# if defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER)
204# define P_CC_INTELX
205# endif
206# if defined(__clang__)
207# define P_CC_CLANG
208# endif
209# if defined(__PGI)
210# define P_CC_PGI
211# endif
212# if defined(_CRAYC)
213# define P_CC_CRAY
214# endif
215# if defined(__LCC__)
216# define P_CC_LCC
217# endif
218#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
219# define P_CC_SUN
220#elif defined(__xlc__) || defined(__xlC__)
221# define P_CC_XLC
222# if defined(__ibmxl__)
223# define P_CC_IXLC
224# define P_CC_CLANG
225# endif
226#elif defined(__ibmxl__)
227# define P_CC_IXLC
228# define P_CC_CLANG
229#elif defined(__open_xl__)
230# define P_CC_OXLC
231# define P_CC_CLANG
232#elif defined(__HP_cc) || defined(__HP_aCC)
233# define P_CC_HP
234#elif defined (__DECC) || defined(__DECCXX)
235# define P_CC_DEC
236#elif defined(__VMS) && defined(__clang__)
237# define P_CC_DEC
238# define P_CC_CLANG
239#elif (defined(__sgi) || defined(sgi)) && \
240 (defined(_COMPILER_VERSION) || defined(_SGI_COMPILER_VERSION))
241# define P_CC_MIPS
242#elif defined(__USLC__) && defined(__SCO_VERSION__)
243# define P_CC_USLC
244#elif defined(__WATCOMC__)
245# define P_CC_WATCOM
246#elif defined(__BORLANDC__)
247# define P_CC_BORLAND
248#elif defined(__INTEL_COMPILER)
249# define P_CC_INTEL
250#elif defined(__INTEL_CLANG_COMPILER) || defined(__INTEL_LLVM_COMPILER)
251# define P_CC_INTELX
252#elif defined(__PGI)
253# define P_CC_PGI
254#elif defined(_CRAYC)
255# define P_CC_CRAY
256#elif defined(__LCC__)
257# define P_CC_LCC
258#elif defined(__clang__)
259# define P_CC_CLANG
260#endif
261
262/* We need this to generate full Doxygen documentation */
263
264#ifdef DOXYGEN
265# ifndef P_CC_MSVC
266# define P_CC_MSVC
267# endif
268# ifndef P_CC_GNU
269# define P_CC_GNU
270# endif
271# ifndef P_CC_MINGW
272# define P_CC_MINGW
273# endif
274# ifndef P_CC_INTEL
275# define P_CC_INTEL
276# endif
277# ifndef P_CC_INTELX
278# define P_CC_INTELX
279# endif
280# ifndef P_CC_CLANG
281# define P_CC_CLANG
282# endif
283# ifndef P_CC_SUN
284# define P_CC_SUN
285# endif
286# ifndef P_CC_XLC
287# define P_CC_XLC
288# endif
289# ifndef P_CC_IXLC
290# define P_CC_IXLC
291# endif
292# ifndef P_CC_OXLC
293# define P_CC_OXLC
294# endif
295# ifndef P_CC_HP
296# define P_CC_HP
297# endif
298# ifndef P_CC_DEC
299# define P_CC_DEC
300# endif
301# ifndef P_CC_MIPS
302# define P_CC_MIPS
303# endif
304# ifndef P_CC_USLC
305# define P_CC_USLC
306# endif
307# ifndef P_CC_WATCOM
308# define P_CC_WATCOM
309# endif
310# ifndef P_CC_BORLAND
311# define P_CC_BORLAND
312# endif
313# ifndef P_CC_PGI
314# define P_CC_PGI
315# endif
316# ifndef P_CC_CRAY
317# define P_CC_CRAY
318# endif
319# ifndef P_CC_LCC
320# define P_CC_LCC
321# endif
322#endif
323
324#endif /* PLIBSYS_HEADER_PMACROSCOMPILER_H */