[Openmp-commits] [openmp] r246314 - [OpenMP] [CMake] Removing expand-vars.pl in favor of CMake's configure_file()

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 28 11:42:11 PDT 2015


Author: jlpeyton
Date: Fri Aug 28 13:42:10 2015
New Revision: 246314

URL: http://llvm.org/viewvc/llvm-project?rev=246314&view=rev
Log:
[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

Modified:
    openmp/trunk/runtime/Build_With_CMake.txt
    openmp/trunk/runtime/CMakeLists.txt
    openmp/trunk/runtime/cmake/LibompDefinitions.cmake
    openmp/trunk/runtime/cmake/LibompHandleFlags.cmake
    openmp/trunk/runtime/src/CMakeLists.txt
    openmp/trunk/runtime/src/include/30/omp.h.var
    openmp/trunk/runtime/src/include/30/omp_lib.f.var
    openmp/trunk/runtime/src/include/30/omp_lib.f90.var
    openmp/trunk/runtime/src/include/30/omp_lib.h.var
    openmp/trunk/runtime/src/include/40/omp.h.var
    openmp/trunk/runtime/src/include/40/omp_lib.f.var
    openmp/trunk/runtime/src/include/40/omp_lib.f90.var
    openmp/trunk/runtime/src/include/40/omp_lib.h.var
    openmp/trunk/runtime/src/include/41/omp.h.var
    openmp/trunk/runtime/src/include/41/omp_lib.f.var
    openmp/trunk/runtime/src/include/41/omp_lib.f90.var
    openmp/trunk/runtime/src/include/41/omp_lib.h.var
    openmp/trunk/runtime/src/kmp.h
    openmp/trunk/runtime/src/kmp_itt.c
    openmp/trunk/runtime/src/kmp_os.h
    openmp/trunk/runtime/src/libomp.rc.var
    openmp/trunk/runtime/src/ompt-general.c
    openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c
    openmp/trunk/runtime/src/z_Linux_asm.s

Modified: openmp/trunk/runtime/Build_With_CMake.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/Build_With_CMake.txt?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/Build_With_CMake.txt (original)
+++ openmp/trunk/runtime/Build_With_CMake.txt Fri Aug 28 13:42:10 2015
@@ -116,9 +116,6 @@ Library type can be normal, profile, or
 -DCMAKE_BUILD_TYPE=Release|Debug|RelWithDebInfo
 Build type can be Release, Debug, or RelWithDebInfo.
 
--DLIBOMP_VERSION=5|4
-libomp major version can be 5 or 4.
-
 -DLIBOMP_OMP_VERSION=41|40|30
 OpenMP version can be either 41, 40 or 30.
 

Modified: openmp/trunk/runtime/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/CMakeLists.txt?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/CMakeLists.txt (original)
+++ openmp/trunk/runtime/CMakeLists.txt Fri Aug 28 13:42:10 2015
@@ -23,6 +23,10 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMA
   set(LIBOMP_STANDALONE_BUILD TRUE)
 endif()
 
+# Set libomp version
+set(LIBOMP_VERSION_MAJOR 5)
+set(LIBOMP_VERSION_MINOR 0)
+
 # These include files are in the cmake/ subdirectory
 include(LibompUtils)
 include(LibompGetArchitecture)
@@ -82,11 +86,17 @@ libomp_check_variable(LIBOMP_ARCH 32e x8
 set(LIBOMP_LIB_TYPE normal CACHE STRING
   "Performance,Profiling,Stubs library (normal/profile/stubs)")
 libomp_check_variable(LIBOMP_LIB_TYPE normal profile stubs)
-set(LIBOMP_VERSION 5 CACHE STRING
-  "Produce libguide (version 4) or libomp (version 5)")
 set(LIBOMP_OMP_VERSION 41 CACHE STRING
   "The OpenMP version (41/40/30)")
 libomp_check_variable(LIBOMP_OMP_VERSION 41 40 30)
+# Set the OpenMP Year and Month assiociated with version
+if(${LIBOMP_OMP_VERSION} GREATER 40 OR ${LIBOMP_OMP_VERSION} EQUAL 40)
+  set(LIBOMP_OMP_YEAR_MONTH 201307)
+elseif(${LIBOMP_OMP_VERSION} GREATER 30 OR ${LIBOMP_OMP_VERSION} EQUAL 30)
+  set(LIBOMP_OMP_YEAR_MONTH 201107)
+else()
+  set(LIBOMP_OMP_YEAR_MONTH 200505)
+endif()
 set(LIBOMP_MIC_ARCH knc CACHE STRING
   "Intel(R) Many Integrated Core Architecture (Intel(R) MIC Architecture) (knf/knc).  Ignored if not Intel(R) MIC Architecture build.")
 if("${LIBOMP_ARCH}" STREQUAL "mic")
@@ -126,10 +136,12 @@ set(LIBOMP_COPY_EXPORTS TRUE CACHE STRIN
   "Should exports be copied into source exports/ directory?")
 
 # Get the build number from kmp_version.c
-libomp_get_build_number("${CMAKE_CURRENT_SOURCE_DIR}" LIBOMP_BUILD_NUMBER)
+libomp_get_build_number("${CMAKE_CURRENT_SOURCE_DIR}" LIBOMP_VERSION_BUILD)
+math(EXPR LIBOMP_VERSION_BUILD_YEAR "${LIBOMP_VERSION_BUILD}/10000")
+math(EXPR LIBOMP_VERSION_BUILD_MONTH_DAY "${LIBOMP_VERSION_BUILD}%10000")
 
 # Currently don't record any timestamps
-set(LIBOMP_DATE "No_Timestamp")
+set(LIBOMP_BUILD_DATE "No_Timestamp")
 
 # Architecture
 set(IA32 FALSE)
@@ -294,10 +306,10 @@ if(${LIBOMP_STANDALONE_BUILD})
   libomp_say("Lib Type             -- ${LIBOMP_LIB_TYPE}")
   libomp_say("Fortran Modules      -- ${LIBOMP_FORTRAN_MODULES}")
   # will say development if all zeros
-  if(${LIBOMP_BUILD_NUMBER} STREQUAL 00000000)
+  if(${LIBOMP_VERSION_BUILD} STREQUAL 00000000)
     set(LIBOMP_BUILD Development)
   else()
-    set(LIBOMP_BUILD ${LIBOMP_BUILD_NUMBER})
+    set(LIBOMP_BUILD ${LIBOMP_VERSION_BUILD})
   endif()
   libomp_say("Build                -- ${LIBOMP_BUILD}")
   libomp_say("Use Stats-gathering  -- ${LIBOMP_STATS}")

Modified: openmp/trunk/runtime/cmake/LibompDefinitions.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompDefinitions.cmake?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompDefinitions.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompDefinitions.cmake Fri Aug 28 13:42:10 2015
@@ -11,28 +11,6 @@
 
 function(libomp_get_definitions_flags cppflags)
   set(cppflags_local)
-  libomp_append(cppflags_local "-D USE_ITT_BUILD")
-  # yes... you need 5 backslashes...
-  libomp_append(cppflags_local "-D KMP_ARCH_STR=\"\\\\\"${LIBOMP_LEGAL_ARCH}\\\\\"\"")
-  libomp_append(cppflags_local "-D BUILD_I8")
-  libomp_append(cppflags_local "-D KMP_LIBRARY_FILE=\\\\\"${LIBOMP_LIB_FILE}\\\\\"")
-  libomp_append(cppflags_local "-D KMP_VERSION_MAJOR=${LIBOMP_VERSION}")
-  libomp_append(cppflags_local "-D KMP_NESTED_HOT_TEAMS")
-
-  # customize to 128 bytes for ppc64
-  if(${PPC64})
-    libomp_append(cppflags_local "-D CACHE_LINE=128")
-  else()
-    libomp_append(cppflags_local "-D CACHE_LINE=64")
-  endif()
-
-  libomp_append(cppflags_local "-D KMP_ADJUST_BLOCKTIME=1")
-  libomp_append(cppflags_local "-D BUILD_PARALLEL_ORDERED")
-  libomp_append(cppflags_local "-D KMP_ASM_INTRINS")
-  libomp_append(cppflags_local "-D USE_ITT_NOTIFY" IF_TRUE_1_0 LIBOMP_USE_ITT_NOTIFY)
-  libomp_append(cppflags_local "-D INTEL_NO_ITTNOTIFY_API" IF_FALSE LIBOMP_USE_ITT_NOTIFY)
-  libomp_append(cppflags_local "-D INTEL_ITTNOTIFY_PREFIX=__kmp_itt_")
-  libomp_append(cppflags_local "-D KMP_USE_VERSION_SYMBOLS" IF_TRUE LIBOMP_USE_VERSION_SYMBOLS)
 
   if(WIN32)
     libomp_append(cppflags_local "-D _CRT_SECURE_NO_WARNINGS")
@@ -40,60 +18,14 @@ function(libomp_get_definitions_flags cp
     libomp_append(cppflags_local "-D _WINDOWS")
     libomp_append(cppflags_local "-D _WINNT")
     libomp_append(cppflags_local "-D _WIN32_WINNT=0x0501")
-    libomp_append(cppflags_local "-D KMP_WIN_CDECL")
     libomp_append(cppflags_local "-D _USRDLL")
     libomp_append(cppflags_local "-D _ITERATOR_DEBUG_LEVEL=0" IF_TRUE DEBUG_BUILD)
+    libomp_append(cppflags_local "-D _DEBUG" IF_TRUE DEBUG_BUILD)
   else()
     libomp_append(cppflags_local "-D _GNU_SOURCE")
     libomp_append(cppflags_local "-D _REENTRANT")
-    libomp_append(cppflags_local "-D BUILD_TV")
-    libomp_append(cppflags_local "-D USE_CBLKDATA")
-    libomp_append(cppflags_local "-D KMP_GOMP_COMPAT")
-  endif()
-
-  libomp_append(cppflags_local "-D USE_LOAD_BALANCE" IF_FALSE MIC)
-  if(NOT WIN32 AND NOT APPLE)
-    libomp_append(cppflags_local "-D KMP_TDATA_GTID")
   endif()
-  libomp_append(cppflags_local "-D KMP_USE_ASSERT" IF_TRUE LIBOMP_ENABLE_ASSERTIONS)
-  libomp_append(cppflags_local "-D KMP_DYNAMIC_LIB")
-  libomp_append(cppflags_local "-D KMP_STUB" IF_TRUE STUBS_LIBRARY)
 
-  if(${DEBUG_BUILD} OR ${RELWITHDEBINFO_BUILD})
-    libomp_append(cppflags_local "-D KMP_DEBUG")
-  endif()
-  libomp_append(cppflags_local "-D _DEBUG" IF_TRUE DEBUG_BUILD)
-  libomp_append(cppflags_local "-D BUILD_DEBUG" IF_TRUE DEBUG_BUILD)
-  libomp_append(cppflags_local "-D KMP_STATS_ENABLED" IF_TRUE_1_0 LIBOMP_STATS)
-  libomp_append(cppflags_local "-D USE_DEBUGGER" IF_TRUE_1_0 LIBOMP_USE_DEBUGGER)
-  libomp_append(cppflags_local "-D OMPT_SUPPORT" IF_TRUE_1_0 LIBOMP_OMPT_SUPPORT)
-  libomp_append(cppflags_local "-D OMPT_BLAME" IF_TRUE_1_0 LIBOMP_OMPT_BLAME)
-  libomp_append(cppflags_local "-D OMPT_TRACE" IF_TRUE_1_0 LIBOMP_OMPT_TRACE)
-
-  # OpenMP version flags
-  set(libomp_have_omp_50 0)
-  set(libomp_have_omp_41 0)
-  set(libomp_have_omp_40 0)
-  set(libomp_have_omp_30 0)
-  if(${LIBOMP_OMP_VERSION} EQUAL 50 OR ${LIBOMP_OMP_VERSION} GREATER 50)
-    set(libomp_have_omp_50 1)
-  endif()
-  if(${LIBOMP_OMP_VERSION} EQUAL 41 OR ${LIBOMP_OMP_VERSION} GREATER 41)
-    set(libomp_have_omp_41 1)
-  endif()
-  if(${LIBOMP_OMP_VERSION} EQUAL 40 OR ${LIBOMP_OMP_VERSION} GREATER 40)
-    set(libomp_have_omp_40 1)
-  endif()
-  if(${LIBOMP_OMP_VERSION} EQUAL 30 OR ${LIBOMP_OMP_VERSION} GREATER 30)
-    set(libomp_have_omp_30 1)
-  endif()
-  libomp_append(cppflags_local "-D OMP_50_ENABLED=${libomp_have_omp_50}")
-  libomp_append(cppflags_local "-D OMP_41_ENABLED=${libomp_have_omp_41}")
-  libomp_append(cppflags_local "-D OMP_40_ENABLED=${libomp_have_omp_40}")
-  libomp_append(cppflags_local "-D OMP_30_ENABLED=${libomp_have_omp_30}")
-  libomp_append(cppflags_local "-D KMP_USE_ADAPTIVE_LOCKS" IF_TRUE_1_0 LIBOMP_USE_ADAPTIVE_LOCKS)
-  libomp_append(cppflags_local "-D KMP_DEBUG_ADAPTIVE_LOCKS=0")
-  libomp_append(cppflags_local "-D KMP_USE_INTERNODE_ALIGNMENT" IF_TRUE_1_0 LIBOMP_USE_INTERNODE_ALIGNMENT)
   # CMake doesn't include CPPFLAGS from environment, but we will.
   set(${cppflags} ${cppflags_local} ${LIBOMP_CPPFLAGS} $ENV{CPPFLAGS} PARENT_SCOPE)
 endfunction()

Modified: openmp/trunk/runtime/cmake/LibompHandleFlags.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompHandleFlags.cmake?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompHandleFlags.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompHandleFlags.cmake Fri Aug 28 13:42:10 2015
@@ -119,9 +119,9 @@ function(libomp_get_ldflags ldflags)
   set(ldflags_local)
   libomp_append(ldflags_local "${CMAKE_LINK_DEF_FILE_FLAG}${CMAKE_CURRENT_BINARY_DIR}/${LIBOMP_LIB_NAME}.def"
     IF_DEFINED CMAKE_LINK_DEF_FILE_FLAG)
-  libomp_append(ldflags_local "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}${LIBOMP_VERSION}.0"
+  libomp_append(ldflags_local "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}${LIBOMP_VERSION_MAJOR}.${LIBOMP_VERSION_MINOR}"
     IF_DEFINED CMAKE_C_OSX_CURRENT_VERSION_FLAG)
-  libomp_append(ldflags_local "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${LIBOMP_VERSION}.0"
+  libomp_append(ldflags_local "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}${LIBOMP_VERSION_MAJOR}.${LIBOMP_VERSION_MINOR}"
     IF_DEFINED CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG)
   libomp_append(ldflags_local -Wl,--warn-shared-textrel LIBOMP_HAVE_WARN_SHARED_TEXTREL_FLAG)
   libomp_append(ldflags_local -Wl,--as-needed LIBOMP_HAVE_AS_NEEDED_FLAG)
@@ -170,32 +170,6 @@ function(libomp_get_fflags fflags)
   set(${fflags} ${fflags_local} PARENT_SCOPE)
 endfunction()
 
-# Perl expand-vars.pl flags
-function(libomp_get_evflags evflags)
-  set(evflags_local)
-  libomp_append(evflags_local "-D KMP_TYPE=\"${LIBOMP_LEGAL_TYPE}\"")
-  libomp_append(evflags_local "-D KMP_ARCH=\"${LIBOMP_LEGAL_ARCH}\"")
-  libomp_append(evflags_local "-D KMP_VERSION_MAJOR=${LIBOMP_VERSION}")
-  libomp_append(evflags_local "-D KMP_VERSION_MINOR=0")
-  libomp_append(evflags_local "-D KMP_VERSION_BUILD=${LIBOMP_BUILD_NUMBER}")
-  libomp_append(evflags_local "-D KMP_BUILD_DATE=\"${LIBOMP_DATE}\"")
-  if(${DEBUG_BUILD} OR ${RELWITHDEBINFO_BUILD})
-    libomp_append(evflags_local "-D KMP_DIAG=1")
-    libomp_append(evflags_local "-D KMP_DEBUG_INFO=1")
-  else()
-    libomp_append(evflags_local "-D KMP_DIAG=0")
-    libomp_append(evflags_local "-D KMP_DEBUG_INFO=0")
-  endif()
-  if(${LIBOMP_OMP_VERSION} EQUAL 40 OR ${LIBOMP_OMP_VERSION} GREATER 40)
-    libomp_append(evflags_local "-D OMP_VERSION=201307")
-  elseif(${LIBOMP_OMP_VERSION} EQUAL 30 OR ${LIBOMP_OMP_VERSION} GREATER 30)
-    libomp_append(evflags_local "-D OMP_VERSION=201107")
-  else()
-    libomp_append(evflags_local "-D OMP_VERSION=200505")
-  endif()
-  set(${evflags} ${evflags_local} PARENT_SCOPE)
-endfunction()
-
 # Perl generate-defs.pl flags (For Windows only)
 function(libomp_get_gdflags gdflags)
   set(gdflags_local)

Modified: openmp/trunk/runtime/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/CMakeLists.txt?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/CMakeLists.txt (original)
+++ openmp/trunk/runtime/src/CMakeLists.txt Fri Aug 28 13:42:10 2015
@@ -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)

Modified: openmp/trunk/runtime/src/include/30/omp.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/30/omp.h.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/30/omp.h.var (original)
+++ openmp/trunk/runtime/src/include/30/omp.h.var Fri Aug 28 13:42:10 2015
@@ -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" {

Modified: openmp/trunk/runtime/src/include/30/omp_lib.f.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/30/omp_lib.f.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/30/omp_lib.f.var (original)
+++ openmp/trunk/runtime/src/include/30/omp_lib.f.var Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/include/30/omp_lib.f90.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/30/omp_lib.f90.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/30/omp_lib.f90.var (original)
+++ openmp/trunk/runtime/src/include/30/omp_lib.f90.var Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/include/30/omp_lib.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/30/omp_lib.h.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/30/omp_lib.h.var (original)
+++ openmp/trunk/runtime/src/include/30/omp_lib.h.var Fri Aug 28 13:42:10 2015
@@ -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
 

Modified: openmp/trunk/runtime/src/include/40/omp.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/40/omp.h.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/40/omp.h.var (original)
+++ openmp/trunk/runtime/src/include/40/omp.h.var Fri Aug 28 13:42:10 2015
@@ -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" {

Modified: openmp/trunk/runtime/src/include/40/omp_lib.f.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/40/omp_lib.f.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/40/omp_lib.f.var (original)
+++ openmp/trunk/runtime/src/include/40/omp_lib.f.var Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/include/40/omp_lib.f90.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/40/omp_lib.f90.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/40/omp_lib.f90.var (original)
+++ openmp/trunk/runtime/src/include/40/omp_lib.f90.var Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/include/40/omp_lib.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/40/omp_lib.h.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/40/omp_lib.h.var (original)
+++ openmp/trunk/runtime/src/include/40/omp_lib.h.var Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/include/41/omp.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/41/omp.h.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/41/omp.h.var (original)
+++ openmp/trunk/runtime/src/include/41/omp.h.var Fri Aug 28 13:42:10 2015
@@ -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" {

Modified: openmp/trunk/runtime/src/include/41/omp_lib.f.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/41/omp_lib.f.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/41/omp_lib.f.var (original)
+++ openmp/trunk/runtime/src/include/41/omp_lib.f.var Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/include/41/omp_lib.f90.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/41/omp_lib.f90.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/41/omp_lib.f90.var (original)
+++ openmp/trunk/runtime/src/include/41/omp_lib.f90.var Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/include/41/omp_lib.h.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/include/41/omp_lib.h.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/include/41/omp_lib.h.var (original)
+++ openmp/trunk/runtime/src/include/41/omp_lib.h.var Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/kmp.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp.h?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp.h (original)
+++ openmp/trunk/runtime/src/kmp.h Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/kmp_itt.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_itt.c?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_itt.c (original)
+++ openmp/trunk/runtime/src/kmp_itt.c Fri Aug 28 13:42:10 2015
@@ -1,3 +1,5 @@
+#include "kmp_config.h"
+
 #if USE_ITT_BUILD
 /*
  * kmp_itt.c -- ITT Notify interface.

Modified: openmp/trunk/runtime/src/kmp_os.h
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_os.h?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_os.h (original)
+++ openmp/trunk/runtime/src/kmp_os.h Fri Aug 28 13:42:10 2015
@@ -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

Modified: openmp/trunk/runtime/src/libomp.rc.var
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/libomp.rc.var?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/libomp.rc.var (original)
+++ openmp/trunk/runtime/src/libomp.rc.var Fri Aug 28 13:42:10 2015
@@ -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_U
 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@, at LIBOMP_VERSION_MINOR@, at LIBOMP_VERSION_BUILD_YEAR@, at LIBOMP_VERSION_BUILD_MONTH_DAY@
+    PRODUCTVERSION @LIBOMP_VERSION_MAJOR@, at LIBOMP_VERSION_MINOR@, at LIBOMP_VERSION_BUILD_YEAR@, at 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 at .@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 at .@LIBOMP_VERSION_MINOR at .@LIBOMP_VERSION_BUILD@ "
+                    "for @LIBOMP_LEGAL_ARCH@ architecture built on @LIBOMP_BUILD_DATE at .\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

Modified: openmp/trunk/runtime/src/ompt-general.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/ompt-general.c?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/ompt-general.c (original)
+++ openmp/trunk/runtime/src/ompt-general.c Fri Aug 28 13:42:10 2015
@@ -15,6 +15,7 @@
  * ompt include files
  ****************************************************************************/
 
+#include "kmp_config.h"
 #include "ompt-internal.h"
 #include "ompt-specific.c"
 

Modified: openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c (original)
+++ openmp/trunk/runtime/src/thirdparty/ittnotify/ittnotify_static.c Fri Aug 28 13:42:10 2015
@@ -8,6 +8,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "kmp_config.h"
 #include "ittnotify_config.h"
 
 #if ITT_PLATFORM==ITT_PLATFORM_WIN

Modified: openmp/trunk/runtime/src/z_Linux_asm.s
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/z_Linux_asm.s?rev=246314&r1=246313&r2=246314&view=diff
==============================================================================
--- openmp/trunk/runtime/src/z_Linux_asm.s (original)
+++ openmp/trunk/runtime/src/z_Linux_asm.s Fri Aug 28 13:42:10 2015
@@ -16,7 +16,7 @@
 // macros
 // -----------------------------------------------------------------------
 
-#include "kmp_platform.h"
+#include "kmp_config.h"
 
 #if KMP_ARCH_X86 || KMP_ARCH_X86_64
 




More information about the Openmp-commits mailing list