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

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 20 13:35:23 PDT 2015


jlpeyton created this revision.
jlpeyton added reviewers: chandlerc, hfinkel.
jlpeyton added a subscriber: openmp-commits.
jlpeyton set the repository for this revision to rL LLVM.

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.

Repository:
  rL LLVM

http://reviews.llvm.org/D12211

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12211.32728.patch
Type: text/x-patch
Size: 38922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20150820/ab5fafbf/attachment-0001.bin>


More information about the Openmp-commits mailing list