rocprofiler-sdk/CMakeFiles/3.27.4/CompilerIdC/CMakeCCompilerId.c File Reference

rocprofiler-sdk/CMakeFiles/3.27.4/CompilerIdC/CMakeCCompilerId.c File Reference#

Rocprofiler SDK Developer API: rocprofiler-sdk/CMakeFiles/3.27.4/CompilerIdC/CMakeCCompilerId.c File Reference
Rocprofiler SDK Developer API 0.5.0
ROCm Profiling API and tools
CMakeCCompilerId.c 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 C_VERSION
 

Functions

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

Variables

char const * info_compiler = "INFO" ":" "compiler[" "" "]"
 
char const * info_platform = "INFO" ":" "platform[" "]"
 
char const * info_arch = "INFO" ":" "arch[" "]"
 
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 17 of file CMakeCCompilerId.c.

◆ ARCHITECTURE_ID

#define ARCHITECTURE_ID

Definition at line 716 of file CMakeCCompilerId.c.

◆ C_VERSION

#define C_VERSION

Definition at line 805 of file CMakeCCompilerId.c.

◆ COMPILER_ID

#define COMPILER_ID   ""

Definition at line 427 of file CMakeCCompilerId.c.

◆ 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 720 of file CMakeCCompilerId.c.

742 :" "compiler_version[" COMPILER_VERSION "]";
743
744/* Construct a string literal encoding the version number components. */
745#elif defined(COMPILER_VERSION_MAJOR)
746char const info_version[] = {
747 'I', 'N', 'F', 'O', ':',
748 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
749 COMPILER_VERSION_MAJOR,
750# ifdef COMPILER_VERSION_MINOR
751 '.', COMPILER_VERSION_MINOR,
752# ifdef COMPILER_VERSION_PATCH
753 '.', COMPILER_VERSION_PATCH,
754# ifdef COMPILER_VERSION_TWEAK
755 '.', COMPILER_VERSION_TWEAK,
756# endif
757# endif
758# endif
759 ']','\0'};
760#endif
761
762/* Construct a string literal encoding the internal version number. */
763#ifdef COMPILER_VERSION_INTERNAL
764char const info_version_internal[] = {
765 'I', 'N', 'F', 'O', ':',
766 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
767 'i','n','t','e','r','n','a','l','[',
768 COMPILER_VERSION_INTERNAL,']','\0'};
769#elif defined(COMPILER_VERSION_INTERNAL_STR)
770char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
771#endif
772
773/* Construct a string literal encoding the version number components. */
774#ifdef SIMULATE_VERSION_MAJOR
775char const info_simulate_version[] = {
776 'I', 'N', 'F', 'O', ':',
777 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
778 SIMULATE_VERSION_MAJOR,
779# ifdef SIMULATE_VERSION_MINOR
780 '.', SIMULATE_VERSION_MINOR,
781# ifdef SIMULATE_VERSION_PATCH
782 '.', SIMULATE_VERSION_PATCH,
783# ifdef SIMULATE_VERSION_TWEAK
784 '.', SIMULATE_VERSION_TWEAK,
785# endif
786# endif
787# endif
788 ']','\0'};
789#endif
790
791/* Construct the string literal in pieces to prevent the source from
792 getting matched. Store it in a pointer rather than an array
793 because some compilers will just produce instructions to fill the
794 array rather than assigning a pointer to a static array. */
795char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
796char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
797
798
799
800#if !defined(__STDC__) && !defined(__clang__)
801# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
802# define C_VERSION "90"
803# else
804# define C_VERSION
805# endif
806#elif __STDC_VERSION__ > 201710L
807# define C_VERSION "23"
808#elif __STDC_VERSION__ >= 201710L
809# define C_VERSION "17"
810#elif __STDC_VERSION__ >= 201000L
811# define C_VERSION "11"
812#elif __STDC_VERSION__ >= 199901L
813# define C_VERSION "99"
814#else
815# define C_VERSION "90"
816#endif
817const char* info_language_standard_default =
818 "INFO" ":" "standard_default[" C_VERSION "]";
819
820const char* info_language_extensions_default = "INFO" ":" "extensions_default["
821#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
822 defined(__TI_COMPILER_VERSION__)) && \
823 !defined(__STRICT_ANSI__)
824 "ON"
825#else
826 "OFF"
827#endif
828"]";
829
830/*--------------------------------------------------------------------------*/
831
832#ifdef ID_VOID_MAIN
833void main() {}
834#else
835# if defined(__CLASSIC_C__)
836int main(argc, argv) int argc; char *argv[];
837# else
838int main(int argc, char* argv[])
839# endif
840{
841 int require = 0;
842 require += info_compiler[argc];
843 require += info_platform[argc];
844 require += info_arch[argc];
845#ifdef COMPILER_VERSION_MAJOR
846 require += info_version[argc];
847#endif
848#ifdef COMPILER_VERSION_INTERNAL
849 require += info_version_internal[argc];
850#endif
851#ifdef SIMULATE_ID
852 require += info_simulate[argc];
853#endif
854#ifdef SIMULATE_VERSION_MAJOR
855 require += info_simulate_version[argc];
856#endif
857#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
858 require += info_cray[argc];
859#endif
860 require += info_language_standard_default[argc];
861 require += info_language_extensions_default[argc];
862 (void)argv;
863 return require;
864}
865#endif

◆ 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 731 of file CMakeCCompilerId.c.

◆ PLATFORM_ID

#define PLATFORM_ID

Definition at line 558 of file CMakeCCompilerId.c.

◆ STRINGIFY

#define STRINGIFY (   X)    STRINGIFY_HELPER(X)

Definition at line 448 of file CMakeCCompilerId.c.

◆ STRINGIFY_HELPER

#define STRINGIFY_HELPER (   X)    #X

Definition at line 447 of file CMakeCCompilerId.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)
Examples
samples/api_callback_tracing/client.cpp.

Definition at line 839 of file CMakeCCompilerId.c.

841{
842 int require = 0;
843 require += info_compiler[argc];
844 require += info_platform[argc];
845 require += info_arch[argc];
846#ifdef COMPILER_VERSION_MAJOR
847 require += info_version[argc];
848#endif
849#ifdef COMPILER_VERSION_INTERNAL
850 require += info_version_internal[argc];
851#endif
852#ifdef SIMULATE_ID
853 require += info_simulate[argc];
854#endif
855#ifdef SIMULATE_VERSION_MAJOR
856 require += info_simulate_version[argc];
857#endif
858#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
859 require += info_cray[argc];
860#endif
861 require += info_language_standard_default[argc];
862 require += info_language_extensions_default[argc];
863 (void)argv;
864 return require;
865}
const char * info_language_extensions_default
char const * info_platform
const char * info_language_standard_default
char const * info_compiler
char const * info_arch

References info_arch, info_compiler, info_language_extensions_default, info_language_standard_default, and info_platform.

Variable Documentation

◆ info_arch

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

Definition at line 797 of file CMakeCCompilerId.c.

Referenced by main().

◆ info_compiler

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

Definition at line 434 of file CMakeCCompilerId.c.

Referenced by main().

◆ info_language_extensions_default

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

Definition at line 821 of file CMakeCCompilerId.c.

Referenced by main().

◆ info_language_standard_default

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

Definition at line 818 of file CMakeCCompilerId.c.

Referenced by main().

◆ info_platform

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

Definition at line 796 of file CMakeCCompilerId.c.

Referenced by main().