[Openmp-dev] cmake build integration

Peyton, Jonathan L jonathan.l.peyton at intel.com
Tue Apr 28 16:05:10 PDT 2015

Yes, I currently have a preliminary version for this functionality.  It includes:

1) very basic top level CMakeLists.txt file which only calls add_subdirectory(runtime)
2) correct install target, which will install in $DESTDIR/$CMAKE_INSTALL_PREFIX/lib{LLVM_LIBDIR_SUFFIX} for the libray, $DESTDIR/$CMAKE_INSTALL_PREFIX/lib{LLVM_LIBDIR_SUFFIX}/clang/{CLANG_VERSION}/include for omp.h and iomp.h
3) I also have it recognize when it is a standalone build, so it knows when to ignore LLVM_ based variables, etc.

I have attached the whole thing as one patch here if you want to try it out or take a look at it.
Keep in mind that a lot of the changes are to the cmake/MicroTests.cmake file which is a refactoring job but not critical for
LLVM integration.

To try this out:
1) checkout LLVM
2) checkout clang into llvm/tools
3) checkout compiler-rt into llvm/projects
4) checkout openmp into llvm/projects
5) apply the patch to the llvm/projects/openmp
6) cd llvm/
7) mkdir build && cd build
9) make
10) make install

The final libiomp5.so should be in CMAKE_INSTALL_PREFIX/lib
And omp.h and iomp.h should be in CMAKE_INSTALL_PREFIX/lib/clang/3.x.x/include

I haven’t bothered putting the Fortran headers and modules in any install target yet but that can be done if necessary.

-- Johnny

From: openmp-dev-bounces at cs.uiuc.edu [mailto:openmp-dev-bounces at cs.uiuc.edu] On Behalf Of Jack Howarth
Sent: Tuesday, April 28, 2015 5:08 PM
To: openmp-dev at cs.uiuc.edu
Subject: [Openmp-dev] cmake build integration

   Is anyone working on modifications to the projects/CMakeLists.txt in llvm and the missing top-level  CMakeLists.txt file for openmp? The openmp merge seems to be making rapid progress towards passing the OpenMP3.1_Validation test suite with the recent and proposed commits so it might be about time to start implementing the missing support for building openmp within the llvm cmake build infrastructure.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20150428/eb726963/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmake_integration_v1.patch
Type: application/octet-stream
Size: 43378 bytes
Desc: cmake_integration_v1.patch
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20150428/eb726963/attachment.obj>

More information about the Openmp-dev mailing list