Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * kmp_version.h -- version number for this release |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 3 | */ |
| 4 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 5 | //===----------------------------------------------------------------------===// |
| 6 | // |
Chandler Carruth | 57b08b0 | 2019-01-19 10:56:40 +0000 | [diff] [blame] | 7 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 8 | // See https://llvm.org/LICENSE.txt for license information. |
| 9 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 13 | #ifndef KMP_VERSION_H |
| 14 | #define KMP_VERSION_H |
| 15 | |
| 16 | #ifdef __cplusplus |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 17 | extern "C" { |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 18 | #endif // __cplusplus |
| 19 | |
| 20 | #ifndef KMP_VERSION_MAJOR |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 21 | #error KMP_VERSION_MAJOR macro is not defined. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 22 | #endif |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 23 | #define KMP_VERSION_MINOR 0 |
| 24 | /* Using "magic" prefix in all the version strings is rather convenient to get |
| 25 | static version info from binaries by using standard utilities "strings" and |
| 26 | "grep", e. g.: |
Jonathan Peyton | 6633829 | 2015-06-01 02:37:28 +0000 | [diff] [blame] | 27 | $ strings libomp.so | grep "@(#)" |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 28 | gives clean list of all version strings in the library. Leading zero helps |
| 29 | to keep version string separate from printable characters which may occurs |
| 30 | just before version string. */ |
| 31 | #define KMP_VERSION_MAGIC_STR "\x00@(#) " |
| 32 | #define KMP_VERSION_MAGIC_LEN 6 // Length of KMP_VERSION_MAGIC_STR. |
| 33 | #define KMP_VERSION_PREF_STR "Intel(R) OMP " |
| 34 | #define KMP_VERSION_PREFIX KMP_VERSION_MAGIC_STR KMP_VERSION_PREF_STR |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 35 | |
| 36 | /* declare all the version string constants for KMP_VERSION env. variable */ |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 37 | extern int const __kmp_version_major; |
| 38 | extern int const __kmp_version_minor; |
| 39 | extern int const __kmp_version_build; |
| 40 | extern int const __kmp_openmp_version; |
| 41 | extern char const |
| 42 | __kmp_copyright[]; // Old variable, kept for compatibility with ITC and ITP. |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 43 | extern char const __kmp_version_copyright[]; |
| 44 | extern char const __kmp_version_lib_ver[]; |
| 45 | extern char const __kmp_version_lib_type[]; |
| 46 | extern char const __kmp_version_link_type[]; |
| 47 | extern char const __kmp_version_build_time[]; |
| 48 | extern char const __kmp_version_target_env[]; |
| 49 | extern char const __kmp_version_build_compiler[]; |
| 50 | extern char const __kmp_version_alt_comp[]; |
| 51 | extern char const __kmp_version_omp_api[]; |
| 52 | // ??? extern char const __kmp_version_debug[]; |
| 53 | extern char const __kmp_version_lock[]; |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 54 | extern char const __kmp_version_nested_stats_reporting[]; |
| 55 | extern char const __kmp_version_ftnstdcall[]; |
| 56 | extern char const __kmp_version_ftncdecl[]; |
| 57 | extern char const __kmp_version_ftnextra[]; |
| 58 | |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 59 | void __kmp_print_version_1(void); |
| 60 | void __kmp_print_version_2(void); |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 61 | |
| 62 | #ifdef __cplusplus |
Jonathan Peyton | 3041982 | 2017-05-12 18:01:32 +0000 | [diff] [blame] | 63 | } // extern "C" |
Jim Cownie | 5e8470a | 2013-09-27 10:38:44 +0000 | [diff] [blame] | 64 | #endif // __cplusplus |
| 65 | |
| 66 | #endif /* KMP_VERSION_H */ |