summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2015-08-28 18:42:10 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2015-08-28 18:42:10 +0000
commitc0225ca2769de22834afba06b1b8e7f318c0f7b7 (patch)
tree51e383c892fc760ac6c96e823a6e958e0419067d /openmp/runtime/src
parentdc65532fd96aed009a16a7e4bce03a63204fd7ac (diff)
downloadbcm5719-llvm-c0225ca2769de22834afba06b1b8e7f318c0f7b7.tar.gz
bcm5719-llvm-c0225ca2769de22834afba06b1b8e7f318c0f7b7.zip
[OpenMP] [CMake] Removing expand-vars.pl in favor of CMake's configure_file()
Currently, the libomp CMake build system uses a Perl script to configure files (tools/expand-vars.pl). This patch replaces the use of the Perl script by using CMake's configure_file() function. The major changes include: 1. *.var has every $KMP_* variable changed to @LIBOMP_*@ 2. kmp_config.h.cmake is a new file which contains all the feature macros and #cmakedefine lines 3. Most of the -D lines have been moved from LibompDefinitions.cmake but some OS specific MACROs (e.g., _GNU_SOURCE) remain. 4. All expand-vars.pl related logic is removed from the CMake files. One important note about this change is that it breaks the old Perl+Makefile build system because it can't create kmp_config.h properly. Differential Review: http://reviews.llvm.org/D12211 llvm-svn: 246314
Diffstat (limited to 'openmp/runtime/src')
-rw-r--r--openmp/runtime/src/CMakeLists.txt66
-rw-r--r--openmp/runtime/src/include/30/omp.h.var8
-rw-r--r--openmp/runtime/src/include/30/omp_lib.f.var10
-rw-r--r--openmp/runtime/src/include/30/omp_lib.f90.var10
-rw-r--r--openmp/runtime/src/include/30/omp_lib.h.var10
-rw-r--r--openmp/runtime/src/include/40/omp.h.var8
-rw-r--r--openmp/runtime/src/include/40/omp_lib.f.var10
-rw-r--r--openmp/runtime/src/include/40/omp_lib.f90.var10
-rw-r--r--openmp/runtime/src/include/40/omp_lib.h.var10
-rw-r--r--openmp/runtime/src/include/41/omp.h.var8
-rw-r--r--openmp/runtime/src/include/41/omp_lib.f.var10
-rw-r--r--openmp/runtime/src/include/41/omp_lib.f90.var10
-rw-r--r--openmp/runtime/src/include/41/omp_lib.h.var10
-rw-r--r--openmp/runtime/src/kmp.h2
-rw-r--r--openmp/runtime/src/kmp_itt.c2
-rw-r--r--openmp/runtime/src/kmp_os.h3
-rw-r--r--openmp/runtime/src/libomp.rc.var40
-rw-r--r--openmp/runtime/src/ompt-general.c1
-rw-r--r--openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c1
-rw-r--r--openmp/runtime/src/z_Linux_asm.s2
20 files changed, 107 insertions, 124 deletions
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index 637f45b75d9..d059ec48a31 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -9,36 +9,12 @@
#//===----------------------------------------------------------------------===//
#
-# Using expand-vars.pl to generate files
-# - 'file' is generated using expand-vars.pl and 'file'.var
-# - Any .var file should use this recipe
-# TODO: Use CMake's configure_file() instead
-macro(libomp_expand_vars_recipe file_dir filename)
- get_source_file_property(libomp_extra_evflags ${filename} EV_COMPILE_DEFINITIONS)
- if("${libomp_extra_evflags}" MATCHES "NOTFOUND")
- set(libomp_extra_evflags)
- else()
- libomp_string_to_list("${libomp_extra_evflags}" libomp_extra_evflags)
- endif()
- if(NOT "${filename}" STREQUAL "")
- add_custom_command(
- OUTPUT ${filename}
- COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/expand-vars.pl
- --strict ${LIBOMP_EVFLAGS} ${libomp_extra_evflags} ${file_dir}/${filename}.var ${filename}
- DEPENDS ${file_dir}/${filename}.var kmp_version.c ${LIBOMP_TOOLS_DIR}/expand-vars.pl
- )
- endif()
-endmacro()
-libomp_get_evflags(LIBOMP_EVFLAGS)
-libomp_string_to_list("${LIBOMP_EVFLAGS}" LIBOMP_EVFLAGS)
-set_source_files_properties(omp_lib.h PROPERTIES EV_COMPILE_DEFINITIONS "-D KMP_INT_PTR_KIND=\"int_ptr_kind()\"")
-set_source_files_properties(libomp.rc PROPERTIES EV_COMPILE_DEFINITIONS "-D KMP_FILE=${LIBOMP_LIB_FILE}" GENERATED TRUE)
-libomp_expand_vars_recipe(${LIBOMP_INC_DIR} omp.h)
-libomp_expand_vars_recipe(${LIBOMP_INC_DIR} ompt.h)
-libomp_expand_vars_recipe(${LIBOMP_INC_DIR} omp_lib.h)
-libomp_expand_vars_recipe(${LIBOMP_INC_DIR} omp_lib.f)
-libomp_expand_vars_recipe(${LIBOMP_INC_DIR} omp_lib.f90)
-libomp_expand_vars_recipe(${LIBOMP_SRC_DIR} libomp.rc)
+# Configure omp.h, kmp_config.h and ompt.h if necessary
+configure_file(${LIBOMP_INC_DIR}/omp.h.var omp.h @ONLY)
+configure_file(kmp_config.h.cmake kmp_config.h @ONLY)
+if(${LIBOMP_OMPT_SUPPORT})
+ configure_file(${LIBOMP_INC_DIR}/ompt.h.var ompt.h @ONLY)
+endif()
# Generate message catalog files: kmp_i18n_id.inc and kmp_i18n_default.inc
add_custom_command(
@@ -169,25 +145,24 @@ set_target_properties(omp PROPERTIES
libomp_get_libflags(LIBOMP_CONFIGURED_LIBFLAGS)
target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS})
-# Create *.inc and omp.h before compiling any sources
-# objects depend on : .inc files and omp.h (and ompt.h if LIBOMP_OMPT_SUPPORT is on)
-# This way the *.inc and omp.h are generated before any compilations take place
-set(LIBOMP_NEEDED_HEADERS kmp_i18n_id.inc kmp_i18n_default.inc omp.h)
-libomp_append(LIBOMP_NEEDED_HEADERS ompt.h LIBOMP_OMPT_SUPPORT)
-add_custom_target(libomp-needed-headers DEPENDS ${LIBOMP_NEEDED_HEADERS})
+# Create *.inc before compiling any sources
+# objects depend on : .inc files
+add_custom_target(libomp-needed-headers DEPENDS kmp_i18n_id.inc kmp_i18n_default.inc)
add_dependencies(omp libomp-needed-headers)
# Windows specific build rules
if(WIN32)
+ configure_file(libomp.rc.var libomp.rc @ONLY)
+
# Create .def and .rc file before compiling any sources
- add_custom_target(libomp-needed-windows-files DEPENDS ${LIBOMP_LIB_NAME}.def libomp.rc)
+ add_custom_target(libomp-needed-windows-files DEPENDS ${LIBOMP_LIB_NAME}.def)
add_dependencies(omp libomp-needed-windows-files)
- # z_Windows_NT-586_asm.asm (masm file) send it i386 or x86_64 architecture definition flag
- if(${IA32})
- set_source_files_properties(z_Windows_NT-586_asm.asm PROPERTIES COMPILE_DEFINITIONS "_M_IA32")
- elseif(${INTEL64})
- set_source_files_properties(z_Windows_NT-586_asm.asm PROPERTIES COMPILE_DEFINITIONS "_M_AMD64")
- endif()
+ # z_Windows_NT-586_asm.asm requires definitions to be sent via command line
+ # It only needs the architecutre macro and OMPT_SUPPORT=0|1
+ libomp_append(LIBOMP_MASM_DEFINITIONS "_M_IA32" IF_TRUE IA32)
+ libomp_append(LIBOMP_MASM_DEFINITIONS "_M_AMD64" IF_TRUE INTEL64)
+ libomp_append(LIBOMP_MASM_DEFINITIONS "OMPT_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPT_SUPPORT)
+ set_source_files_properties(z_Windows_NT-586_asm.asm PROPERTIES COMPILE_DEFINITIONS "${LIBOMP_MASM_DEFINITIONS}")
set_source_files_properties(thirdparty/ittnotify/ittnotify_static.c PROPERTIES COMPILE_DEFINITIONS "UNICODE")
# Create Windows import library
@@ -197,7 +172,7 @@ if(WIN32)
set(LIBOMP_IMP_LIB_FILE ${LIBOMP_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
set(LIBOMP_GENERATED_IMP_LIB_FILENAME ${LIBOMP_LIB_FILE}${CMAKE_STATIC_LIBRARY_SUFFIX})
set_target_properties(omp PROPERTIES
- VERSION ${LIBOMP_VERSION}.0 # uses /version flag
+ VERSION ${LIBOMP_VERSION_MAJOR}.${LIBOMP_VERSION_MINOR} # uses /version flag
IMPORT_PREFIX "" IMPORT_SUFFIX "" # control generated import library name when building omp
ARCHIVE_OUTPUT_NAME ${LIBOMP_GENERATED_IMP_LIB_FILENAME}
)
@@ -232,6 +207,9 @@ endif()
# Building the Fortran module files
# One compilation step creates both omp_lib.mod and omp_lib_kinds.mod
if(${LIBOMP_FORTRAN_MODULES})
+ configure_file(${LIBOMP_INC_DIR}/omp_lib.h.var omp_lib.h @ONLY)
+ configure_file(${LIBOMP_INC_DIR}/omp_lib.f.var omp_lib.f @ONLY)
+ configure_file(${LIBOMP_INC_DIR}/omp_lib.f90.var omp_lib.f90 @ONLY)
add_custom_target(libomp-mod ALL DEPENDS omp_lib.mod omp_lib_kinds.mod)
libomp_get_fflags(LIBOMP_CONFIGURED_FFLAGS)
if(CMAKE_Fortran_COMPILER_SUPPORTS_F90)
diff --git a/openmp/runtime/src/include/30/omp.h.var b/openmp/runtime/src/include/30/omp.h.var
index 02b049b3dfc..9ffcfb297bd 100644
--- a/openmp/runtime/src/include/30/omp.h.var
+++ b/openmp/runtime/src/include/30/omp.h.var
@@ -16,10 +16,10 @@
#ifndef __OMP_H
# define __OMP_H
-# define KMP_VERSION_MAJOR $KMP_VERSION_MAJOR
-# define KMP_VERSION_MINOR $KMP_VERSION_MINOR
-# define KMP_VERSION_BUILD $KMP_VERSION_BUILD
-# define KMP_BUILD_DATE "$KMP_BUILD_DATE"
+# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
+# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
+# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@
+# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@"
# ifdef __cplusplus
extern "C" {
diff --git a/openmp/runtime/src/include/30/omp_lib.f.var b/openmp/runtime/src/include/30/omp_lib.f.var
index a8258954aad..99122067af0 100644
--- a/openmp/runtime/src/include/30/omp_lib.f.var
+++ b/openmp/runtime/src/include/30/omp_lib.f.var
@@ -36,11 +36,11 @@
use omp_lib_kinds
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
- character(*), parameter :: kmp_build_date = '$KMP_BUILD_DATE'
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
+ character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@'
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
diff --git a/openmp/runtime/src/include/30/omp_lib.f90.var b/openmp/runtime/src/include/30/omp_lib.f90.var
index 8e8669757b7..3325486d26a 100644
--- a/openmp/runtime/src/include/30/omp_lib.f90.var
+++ b/openmp/runtime/src/include/30/omp_lib.f90.var
@@ -32,12 +32,12 @@
use omp_lib_kinds
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
character(*) kmp_build_date
- parameter( kmp_build_date = '$KMP_BUILD_DATE' )
+ parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
diff --git a/openmp/runtime/src/include/30/omp_lib.h.var b/openmp/runtime/src/include/30/omp_lib.h.var
index f8677cfd619..84ed39b321c 100644
--- a/openmp/runtime/src/include/30/omp_lib.h.var
+++ b/openmp/runtime/src/include/30/omp_lib.h.var
@@ -33,12 +33,12 @@
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
character(*) kmp_build_date
- parameter( kmp_build_date = '$KMP_BUILD_DATE' )
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
+ parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
interface
diff --git a/openmp/runtime/src/include/40/omp.h.var b/openmp/runtime/src/include/40/omp.h.var
index 0fd3d6512bf..7a832acefbe 100644
--- a/openmp/runtime/src/include/40/omp.h.var
+++ b/openmp/runtime/src/include/40/omp.h.var
@@ -16,10 +16,10 @@
#ifndef __OMP_H
# define __OMP_H
-# define KMP_VERSION_MAJOR $KMP_VERSION_MAJOR
-# define KMP_VERSION_MINOR $KMP_VERSION_MINOR
-# define KMP_VERSION_BUILD $KMP_VERSION_BUILD
-# define KMP_BUILD_DATE "$KMP_BUILD_DATE"
+# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
+# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
+# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@
+# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@"
# ifdef __cplusplus
extern "C" {
diff --git a/openmp/runtime/src/include/40/omp_lib.f.var b/openmp/runtime/src/include/40/omp_lib.f.var
index f7df3936c18..a95bb6aba83 100644
--- a/openmp/runtime/src/include/40/omp_lib.f.var
+++ b/openmp/runtime/src/include/40/omp_lib.f.var
@@ -39,11 +39,11 @@
use omp_lib_kinds
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
- character(*), parameter :: kmp_build_date = '$KMP_BUILD_DATE'
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
+ character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@'
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
diff --git a/openmp/runtime/src/include/40/omp_lib.f90.var b/openmp/runtime/src/include/40/omp_lib.f90.var
index 5a8221c454e..c0e08657b03 100644
--- a/openmp/runtime/src/include/40/omp_lib.f90.var
+++ b/openmp/runtime/src/include/40/omp_lib.f90.var
@@ -35,12 +35,12 @@
use omp_lib_kinds
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
character(*) kmp_build_date
- parameter( kmp_build_date = '$KMP_BUILD_DATE' )
+ parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
diff --git a/openmp/runtime/src/include/40/omp_lib.h.var b/openmp/runtime/src/include/40/omp_lib.h.var
index dd3e42b78c0..e4df155beea 100644
--- a/openmp/runtime/src/include/40/omp_lib.h.var
+++ b/openmp/runtime/src/include/40/omp_lib.h.var
@@ -30,12 +30,12 @@
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
integer, parameter :: kmp_lock_hint_kind = omp_integer_kind
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
character(*) kmp_build_date
- parameter( kmp_build_date = '$KMP_BUILD_DATE' )
+ parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
diff --git a/openmp/runtime/src/include/41/omp.h.var b/openmp/runtime/src/include/41/omp.h.var
index 86f019efba9..ddea4dfd560 100644
--- a/openmp/runtime/src/include/41/omp.h.var
+++ b/openmp/runtime/src/include/41/omp.h.var
@@ -16,10 +16,10 @@
#ifndef __OMP_H
# define __OMP_H
-# define KMP_VERSION_MAJOR $KMP_VERSION_MAJOR
-# define KMP_VERSION_MINOR $KMP_VERSION_MINOR
-# define KMP_VERSION_BUILD $KMP_VERSION_BUILD
-# define KMP_BUILD_DATE "$KMP_BUILD_DATE"
+# define KMP_VERSION_MAJOR @LIBOMP_VERSION_MAJOR@
+# define KMP_VERSION_MINOR @LIBOMP_VERSION_MINOR@
+# define KMP_VERSION_BUILD @LIBOMP_VERSION_BUILD@
+# define KMP_BUILD_DATE "@LIBOMP_BUILD_DATE@"
# ifdef __cplusplus
extern "C" {
diff --git a/openmp/runtime/src/include/41/omp_lib.f.var b/openmp/runtime/src/include/41/omp_lib.f.var
index c28b1ec731c..9f9362a8be1 100644
--- a/openmp/runtime/src/include/41/omp_lib.f.var
+++ b/openmp/runtime/src/include/41/omp_lib.f.var
@@ -39,11 +39,11 @@
use omp_lib_kinds
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
- character(*), parameter :: kmp_build_date = '$KMP_BUILD_DATE'
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
+ character(*), parameter :: kmp_build_date = '@LIBOMP_BUILD_DATE@'
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
diff --git a/openmp/runtime/src/include/41/omp_lib.f90.var b/openmp/runtime/src/include/41/omp_lib.f90.var
index 10274ca1aba..f7c1258745c 100644
--- a/openmp/runtime/src/include/41/omp_lib.f90.var
+++ b/openmp/runtime/src/include/41/omp_lib.f90.var
@@ -35,12 +35,12 @@
use omp_lib_kinds
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
character(*) kmp_build_date
- parameter( kmp_build_date = '$KMP_BUILD_DATE' )
+ parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
diff --git a/openmp/runtime/src/include/41/omp_lib.h.var b/openmp/runtime/src/include/41/omp_lib.h.var
index 3f1a21cb8f5..003a2f1e182 100644
--- a/openmp/runtime/src/include/41/omp_lib.h.var
+++ b/openmp/runtime/src/include/41/omp_lib.h.var
@@ -30,12 +30,12 @@
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
integer, parameter :: kmp_lock_hint_kind = omp_integer_kind
- integer (kind=omp_integer_kind), parameter :: openmp_version = $OMP_VERSION
- integer (kind=omp_integer_kind), parameter :: kmp_version_major = $KMP_VERSION_MAJOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_minor = $KMP_VERSION_MINOR
- integer (kind=omp_integer_kind), parameter :: kmp_version_build = $KMP_VERSION_BUILD
+ integer (kind=omp_integer_kind), parameter :: openmp_version = @LIBOMP_OMP_YEAR_MONTH@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_major = @LIBOMP_VERSION_MAJOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_minor = @LIBOMP_VERSION_MINOR@
+ integer (kind=omp_integer_kind), parameter :: kmp_version_build = @LIBOMP_VERSION_BUILD@
character(*) kmp_build_date
- parameter( kmp_build_date = '$KMP_BUILD_DATE' )
+ parameter( kmp_build_date = '@LIBOMP_BUILD_DATE@' )
integer(kind=omp_sched_kind), parameter :: omp_sched_static = 1
integer(kind=omp_sched_kind), parameter :: omp_sched_dynamic = 2
diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h
index 998446c5814..070d4928653 100644
--- a/openmp/runtime/src/kmp.h
+++ b/openmp/runtime/src/kmp.h
@@ -17,6 +17,8 @@
#ifndef KMP_H
#define KMP_H
+#include "kmp_config.h"
+
/* #define BUILD_PARALLEL_ORDERED 1 */
/* This fix replaces gettimeofday with clock_gettime for better scalability on
diff --git a/openmp/runtime/src/kmp_itt.c b/openmp/runtime/src/kmp_itt.c
index 77ac809d277..486d63550ed 100644
--- a/openmp/runtime/src/kmp_itt.c
+++ b/openmp/runtime/src/kmp_itt.c
@@ -1,3 +1,5 @@
+#include "kmp_config.h"
+
#if USE_ITT_BUILD
/*
* kmp_itt.c -- ITT Notify interface.
diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h
index 77950bc5caa..0ad099623b9 100644
--- a/openmp/runtime/src/kmp_os.h
+++ b/openmp/runtime/src/kmp_os.h
@@ -16,6 +16,7 @@
#ifndef KMP_OS_H
#define KMP_OS_H
+#include "kmp_config.h"
#include <stdlib.h>
#define KMP_FTN_PLAIN 1
@@ -62,8 +63,6 @@
# error Unknown compiler
#endif
-#include "kmp_platform.h"
-
#if (KMP_OS_LINUX || KMP_OS_WINDOWS) && !KMP_OS_CNK && !KMP_ARCH_PPC64
# define KMP_AFFINITY_SUPPORTED 1
# if KMP_OS_WINDOWS && KMP_ARCH_X86_64
diff --git a/openmp/runtime/src/libomp.rc.var b/openmp/runtime/src/libomp.rc.var
index f78a6d19487..cf6a9c9efa2 100644
--- a/openmp/runtime/src/libomp.rc.var
+++ b/openmp/runtime/src/libomp.rc.var
@@ -12,6 +12,7 @@
//
#include "winres.h"
+#include "kmp_config.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // English (U.S.) resources
#pragma code_page(1252)
@@ -19,16 +20,16 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US // English (U.S.) resources
VS_VERSION_INFO VERSIONINFO
// Parts of FILEVERSION and PRODUCTVERSION are 16-bit fields, entire build date yyyymmdd
// does not fit into one version part, so we need to split it into yyyy and mmdd:
- FILEVERSION $KMP_VERSION_MAJOR,$KMP_VERSION_MINOR,${{ our $KMP_VERSION_BUILD; int( $KMP_VERSION_BUILD / 10000 ) . "," . ( $KMP_VERSION_BUILD % 10000 ) }}
- PRODUCTVERSION $KMP_VERSION_MAJOR,$KMP_VERSION_MINOR,${{ our $KMP_VERSION_BUILD; int( $KMP_VERSION_BUILD / 10000 ) . "," . ( $KMP_VERSION_BUILD % 10000 ) }}
+ FILEVERSION @LIBOMP_VERSION_MAJOR@,@LIBOMP_VERSION_MINOR@,@LIBOMP_VERSION_BUILD_YEAR@,@LIBOMP_VERSION_BUILD_MONTH_DAY@
+ PRODUCTVERSION @LIBOMP_VERSION_MAJOR@,@LIBOMP_VERSION_MINOR@,@LIBOMP_VERSION_BUILD_YEAR@,@LIBOMP_VERSION_BUILD_MONTH_DAY@
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
- #if $KMP_DIAG || $KMP_DEBUG_INFO
+#if KMP_DEBUG
| VS_FF_DEBUG
- #endif
- #if $KMP_VERSION_BUILD == 0
+#endif
+#if @LIBOMP_VERSION_BUILD@ == 0
| VS_FF_PRIVATEBUILD | VS_FF_PRERELEASE
- #endif
+#endif
FILEOS VOS_NT_WINDOWS32 // Windows* Server* 2003, XP*, 2000, or NT*
FILETYPE VFT_DLL
BEGIN
@@ -38,31 +39,30 @@ VS_VERSION_INFO VERSIONINFO
BEGIN
// FileDescription and LegalCopyright should be short.
- VALUE "FileDescription", "LLVM* OpenMP* Runtime Library${{ our $MESSAGE_CATALOG; $MESSAGE_CATALOG ? " Message Catalog" : "" }}\0"
+ VALUE "FileDescription", "LLVM* OpenMP* Runtime Library\0"
// Following values may be relatively long.
- VALUE "CompanyName", "Intel Corporation\0"
+ VALUE "CompanyName", "LLVM\0"
// VALUE "LegalTrademarks", "\0" // Not used for now.
VALUE "ProductName", "LLVM* OpenMP* Runtime Library\0"
- VALUE "ProductVersion", "$KMP_VERSION_MAJOR.$KMP_VERSION_MINOR\0"
- VALUE "FileVersion", "$KMP_VERSION_BUILD\0"
- VALUE "InternalName", "$KMP_FILE\0"
- VALUE "OriginalFilename", "$KMP_FILE\0"
+ VALUE "ProductVersion", "@LIBOMP_VERSION_MAJOR@.@LIBOMP_VERSION_MINOR@\0"
+ VALUE "FileVersion", "@LIBOMP_VERSION_BUILD@\0"
+ VALUE "InternalName", "@LIBOMP_LIB_FILE@\0"
+ VALUE "OriginalFilename", "@LIBOMP_LIB_FILE@\0"
VALUE "Comments",
- "LLVM* OpenMP* ${{ our ( $MESSAGE_CATALOG, $KMP_TYPE ); $MESSAGE_CATALOG ? "Runtime Library Message Catalog" : "$KMP_TYPE Library" }} "
- "version $KMP_VERSION_MAJOR.$KMP_VERSION_MINOR.$KMP_VERSION_BUILD "
- "for $KMP_ARCH architecture built on $KMP_BUILD_DATE.\0"
- #if $KMP_VERSION_BUILD == 0
+ "LLVM* OpenMP* @LIBOMP_LEGAL_TYPE@ Library "
+ "version @LIBOMP_VERSION_MAJOR@.@LIBOMP_VERSION_MINOR@.@LIBOMP_VERSION_BUILD@ "
+ "for @LIBOMP_LEGAL_ARCH@ architecture built on @LIBOMP_BUILD_DATE@.\0"
+#if @LIBOMP_VERSION_BUILD@ == 0
VALUE "PrivateBuild",
- "This is a development build for internal testing purposes only. "
- "Do not distribute it outside of Intel.\0"
- #endif
+ "This is a development build.\0"
+#endif
// VALUE "SpecialBuild", "\0" // Not used for now.
END
END
BLOCK "VarFileInfo"
BEGIN
- VALUE "Translation", ${{ our ( $MESSAGE_CATALOG, $LANGUAGE ); $MESSAGE_CATALOG ? $LANGUAGE : 1033 }}, 1200
+ VALUE "Translation", 1033, 1200
// 1033 -- U.S. English, 1200 -- Unicode
END
END
diff --git a/openmp/runtime/src/ompt-general.c b/openmp/runtime/src/ompt-general.c
index 2e5d4ff06fb..cb8eaa0e543 100644
--- a/openmp/runtime/src/ompt-general.c
+++ b/openmp/runtime/src/ompt-general.c
@@ -15,6 +15,7 @@
* ompt include files
****************************************************************************/
+#include "kmp_config.h"
#include "ompt-internal.h"
#include "ompt-specific.c"
diff --git a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
index 0044e75b26c..622a8592a6f 100644
--- a/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
+++ b/openmp/runtime/src/thirdparty/ittnotify/ittnotify_static.c
@@ -8,6 +8,7 @@
//
//===----------------------------------------------------------------------===//
+#include "kmp_config.h"
#include "ittnotify_config.h"
#if ITT_PLATFORM==ITT_PLATFORM_WIN
diff --git a/openmp/runtime/src/z_Linux_asm.s b/openmp/runtime/src/z_Linux_asm.s
index 73f9ccb91e5..7f649b849e4 100644
--- a/openmp/runtime/src/z_Linux_asm.s
+++ b/openmp/runtime/src/z_Linux_asm.s
@@ -16,7 +16,7 @@
// macros
// -----------------------------------------------------------------------
-#include "kmp_platform.h"
+#include "kmp_config.h"
#if KMP_ARCH_X86 || KMP_ARCH_X86_64
OpenPOWER on IntegriCloud