IoT25S IoT Klocka 0.1
Grupparbete för IoT25S på Jensen YH
Loading...
Searching...
No Matches
CMakeCXXCompilerId.cpp File Reference

Go to the source code of this file.

Macros

#define __has_include(x)   0
 
#define COMPILER_ID   ""
 
#define STRINGIFY_HELPER(X)   #X
 
#define STRINGIFY(X)   STRINGIFY_HELPER(X)
 
#define PLATFORM_ID
 
#define ARCHITECTURE_ID
 
#define DEC(n)
 
#define HEX(n)
 
#define CXX_STD_98   199711L
 
#define CXX_STD_11   201103L
 
#define CXX_STD_14   201402L
 
#define CXX_STD_17   201703L
 
#define CXX_STD_20   202002L
 
#define CXX_STD_23   202302L
 
#define CXX_STD   __cplusplus
 

Functions

int main (int argc, char *argv[])
 

Variables

char const * info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"
 
char const * info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"
 
char const * info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"
 
const char * info_language_standard_default
 
const char * info_language_extensions_default
 

Macro Definition Documentation

◆ __has_include

#define __has_include (   x)    0

Definition at line 11 of file CMakeCXXCompilerId.cpp.

◆ ARCHITECTURE_ID

#define ARCHITECTURE_ID

Definition at line 725 of file CMakeCXXCompilerId.cpp.

◆ COMPILER_ID

#define COMPILER_ID   ""

Definition at line 428 of file CMakeCXXCompilerId.cpp.

◆ CXX_STD

#define CXX_STD   __cplusplus

Definition at line 862 of file CMakeCXXCompilerId.cpp.

◆ CXX_STD_11

#define CXX_STD_11   201103L

Definition at line 811 of file CMakeCXXCompilerId.cpp.

◆ CXX_STD_14

#define CXX_STD_14   201402L

Definition at line 812 of file CMakeCXXCompilerId.cpp.

◆ CXX_STD_17

#define CXX_STD_17   201703L

Definition at line 813 of file CMakeCXXCompilerId.cpp.

◆ CXX_STD_20

#define CXX_STD_20   202002L

Definition at line 814 of file CMakeCXXCompilerId.cpp.

◆ CXX_STD_23

#define CXX_STD_23   202302L

Definition at line 815 of file CMakeCXXCompilerId.cpp.

◆ CXX_STD_98

#define CXX_STD_98   199711L

Definition at line 810 of file CMakeCXXCompilerId.cpp.

◆ DEC

#define DEC (   n)
Value:
('0' + (((n) / 10000000)%10)), \
('0' + (((n) / 1000000)%10)), \
('0' + (((n) / 100000)%10)), \
('0' + (((n) / 10000)%10)), \
('0' + (((n) / 1000)%10)), \
('0' + (((n) / 100)%10)), \
('0' + (((n) / 10)%10)), \
('0' + ((n) % 10))

Definition at line 729 of file CMakeCXXCompilerId.cpp.

751 :" "compiler_version[" COMPILER_VERSION "]";
752
753/* Construct a string literal encoding the version number components. */
754#elif defined(COMPILER_VERSION_MAJOR)
755char const info_version[] = {
756 'I', 'N', 'F', 'O', ':',
757 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
758 COMPILER_VERSION_MAJOR,
759# ifdef COMPILER_VERSION_MINOR
760 '.', COMPILER_VERSION_MINOR,
761# ifdef COMPILER_VERSION_PATCH
762 '.', COMPILER_VERSION_PATCH,
763# ifdef COMPILER_VERSION_TWEAK
764 '.', COMPILER_VERSION_TWEAK,
765# endif
766# endif
767# endif
768 ']','\0'};
769#endif
770
771/* Construct a string literal encoding the internal version number. */
772#ifdef COMPILER_VERSION_INTERNAL
773char const info_version_internal[] = {
774 'I', 'N', 'F', 'O', ':',
775 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
776 'i','n','t','e','r','n','a','l','[',
777 COMPILER_VERSION_INTERNAL,']','\0'};
778#elif defined(COMPILER_VERSION_INTERNAL_STR)
779char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
780#endif
781
782/* Construct a string literal encoding the version number components. */
783#ifdef SIMULATE_VERSION_MAJOR
784char const info_simulate_version[] = {
785 'I', 'N', 'F', 'O', ':',
786 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
787 SIMULATE_VERSION_MAJOR,
788# ifdef SIMULATE_VERSION_MINOR
789 '.', SIMULATE_VERSION_MINOR,
790# ifdef SIMULATE_VERSION_PATCH
791 '.', SIMULATE_VERSION_PATCH,
792# ifdef SIMULATE_VERSION_TWEAK
793 '.', SIMULATE_VERSION_TWEAK,
794# endif
795# endif
796# endif
797 ']','\0'};
798#endif
799
800/* Construct the string literal in pieces to prevent the source from
801 getting matched. Store it in a pointer rather than an array
802 because some compilers will just produce instructions to fill the
803 array rather than assigning a pointer to a static array. */
804char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
805char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
806
807
808
809#define CXX_STD_98 199711L
810#define CXX_STD_11 201103L
811#define CXX_STD_14 201402L
812#define CXX_STD_17 201703L
813#define CXX_STD_20 202002L
814#define CXX_STD_23 202302L
815
816#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG)
817# if _MSVC_LANG > CXX_STD_17
818# define CXX_STD _MSVC_LANG
819# elif _MSVC_LANG == CXX_STD_17 && defined(__cpp_aggregate_paren_init)
820# define CXX_STD CXX_STD_20
821# elif _MSVC_LANG > CXX_STD_14 && __cplusplus > CXX_STD_17
822# define CXX_STD CXX_STD_20
823# elif _MSVC_LANG > CXX_STD_14
824# define CXX_STD CXX_STD_17
825# elif defined(__INTEL_CXX11_MODE__) && defined(__cpp_aggregate_nsdmi)
826# define CXX_STD CXX_STD_14
827# elif defined(__INTEL_CXX11_MODE__)
828# define CXX_STD CXX_STD_11
829# else
830# define CXX_STD CXX_STD_98
831# endif
832#elif defined(_MSC_VER) && defined(_MSVC_LANG)
833# if _MSVC_LANG > __cplusplus
834# define CXX_STD _MSVC_LANG
835# else
836# define CXX_STD __cplusplus
837# endif
838#elif defined(__NVCOMPILER)
839# if __cplusplus == CXX_STD_17 && defined(__cpp_aggregate_paren_init)
840# define CXX_STD CXX_STD_20
841# else
842# define CXX_STD __cplusplus
843# endif
844#elif defined(__INTEL_COMPILER) || defined(__PGI)
845# if __cplusplus == CXX_STD_11 && defined(__cpp_namespace_attributes)
846# define CXX_STD CXX_STD_17
847# elif __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi)
848# define CXX_STD CXX_STD_14
849# else
850# define CXX_STD __cplusplus
851# endif
852#elif (defined(__IBMCPP__) || defined(__ibmxl__)) && defined(__linux__)
853# if __cplusplus == CXX_STD_11 && defined(__cpp_aggregate_nsdmi)
854# define CXX_STD CXX_STD_14
855# else
856# define CXX_STD __cplusplus
857# endif
858#elif __cplusplus == 1 && defined(__GXX_EXPERIMENTAL_CXX0X__)
859# define CXX_STD CXX_STD_11
860#else
861# define CXX_STD __cplusplus
862#endif
863
864const char* info_language_standard_default = "INFO" ":" "standard_default["
865#if CXX_STD > CXX_STD_23
866 "26"
867#elif CXX_STD > CXX_STD_20
868 "23"
869#elif CXX_STD > CXX_STD_17
870 "20"
871#elif CXX_STD > CXX_STD_14
872 "17"
873#elif CXX_STD > CXX_STD_11
874 "14"
875#elif CXX_STD >= CXX_STD_11
876 "11"
877#else
878 "98"
879#endif
880"]";
881
882const char* info_language_extensions_default = "INFO" ":" "extensions_default["
883#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
884 defined(__TI_COMPILER_VERSION__)) && \
885 !defined(__STRICT_ANSI__)
886 "ON"
887#else
888 "OFF"
889#endif
890"]";
891
892/*--------------------------------------------------------------------------*/
893
894int main(int argc, char* argv[])
895{
896 int require = 0;
897 require += info_compiler[argc];
898 require += info_platform[argc];
899 require += info_arch[argc];
900#ifdef COMPILER_VERSION_MAJOR
901 require += info_version[argc];
902#endif
903#if defined(COMPILER_VERSION_INTERNAL) || defined(COMPILER_VERSION_INTERNAL_STR)
904 require += info_version_internal[argc];
905#endif
906#ifdef SIMULATE_ID
907 require += info_simulate[argc];
908#endif
909#ifdef SIMULATE_VERSION_MAJOR
910 require += info_simulate_version[argc];
911#endif
912#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
913 require += info_cray[argc];
914#endif
915 require += info_language_standard_default[argc];
916 require += info_language_extensions_default[argc];
917 (void)argv;
918 return require;
919}

◆ HEX

#define HEX (   n)
Value:
('0' + ((n)>>28 & 0xF)), \
('0' + ((n)>>24 & 0xF)), \
('0' + ((n)>>20 & 0xF)), \
('0' + ((n)>>16 & 0xF)), \
('0' + ((n)>>12 & 0xF)), \
('0' + ((n)>>8 & 0xF)), \
('0' + ((n)>>4 & 0xF)), \
('0' + ((n) & 0xF))

Definition at line 740 of file CMakeCXXCompilerId.cpp.

◆ PLATFORM_ID

#define PLATFORM_ID

Definition at line 559 of file CMakeCXXCompilerId.cpp.

◆ STRINGIFY

#define STRINGIFY (   X)    STRINGIFY_HELPER(X)

Definition at line 449 of file CMakeCXXCompilerId.cpp.

◆ STRINGIFY_HELPER

#define STRINGIFY_HELPER (   X)    #X

Definition at line 448 of file CMakeCXXCompilerId.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 895 of file CMakeCXXCompilerId.cpp.

896{
897 int require = 0;
898 require += info_compiler[argc];
899 require += info_platform[argc];
900 require += info_arch[argc];
901#ifdef COMPILER_VERSION_MAJOR
902 require += info_version[argc];
903#endif
904#if defined(COMPILER_VERSION_INTERNAL) || defined(COMPILER_VERSION_INTERNAL_STR)
905 require += info_version_internal[argc];
906#endif
907#ifdef SIMULATE_ID
908 require += info_simulate[argc];
909#endif
910#ifdef SIMULATE_VERSION_MAJOR
911 require += info_simulate_version[argc];
912#endif
913#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
914 require += info_cray[argc];
915#endif
916 require += info_language_standard_default[argc];
917 require += info_language_extensions_default[argc];
918 (void)argv;
919 return require;
920}
char const * info_compiler
const char * info_language_extensions_default
char const * info_platform
const char * info_language_standard_default
char const * info_arch

Variable Documentation

◆ info_arch

char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"

Definition at line 806 of file CMakeCXXCompilerId.cpp.

◆ info_compiler

char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"

Definition at line 435 of file CMakeCXXCompilerId.cpp.

◆ info_language_extensions_default

const char* info_language_extensions_default
Initial value:
= "INFO" ":" "extensions_default["
"OFF"
"]"

Definition at line 883 of file CMakeCXXCompilerId.cpp.

◆ info_language_standard_default

const char* info_language_standard_default
Initial value:
= "INFO" ":" "standard_default["
"98"
"]"

Definition at line 865 of file CMakeCXXCompilerId.cpp.

◆ info_platform

char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"

Definition at line 805 of file CMakeCXXCompilerId.cpp.