[Openmp-dev] CMake overhaul

Jack Howarth howarth.mailing.lists at gmail.com
Mon Jun 22 21:51:41 PDT 2015


Jonathan,
       The build on x86_64-apple-darwin14, with openmp placed in-tree
at llvm/projects, completes fine here. The only difference I see with
these changes is that the libgomp.dylib symlink pointing at
libomp.dylib is no longer created during 'make install'. Is that
change intended?
              Jack

On Mon, Jun 22, 2015 at 5:26 PM, Peyton, Jonathan L
<jonathan.l.peyton at intel.com> wrote:
> Hello everyone,
>
>
>
> I have been working on overhauling the CMake build system for the LLVM
> OpenMP Runtime library.  Instead of sending 1000 small updates, I decided to
> do a complete refactoring/reorganizing/renaming/you-name-it-I-did-it.  **All
> the interface variables are still the same (LIBOMP_OS, LIBOMP_ARCH, etc.)**.
> So there was no change there.  Here are the major changes:
>
> 1) Renaming internal variables/macros/functions – everything has libomp_ or
> LIBOMP_ prefixed to it unless maybe if it is a local variable/parameter
> inside a function/macro.
>
> 2) config-ix.cmake added – compiler flag checks, linker flag checks, some
> feature checks, threading-model check.  This means
> cmake/${CMAKE_C_COMPILER_ID}/*Flags.cmake directories/files are deleted.
>
> 3) All files inside cmake/ subdirectory are renamed to Libompxyz.cmake
>
> 4) I cut off most of the vestigial parts that were a part of the translation
> of build.pl system.  There are still a few that remain like
> LibompExports.cmake (copying things to exports/ subdirectory) and
> LibompMicroTests.cmake (small tests to run on the just created library.
> This is invoked with make libomp-micro-tests), but these can easily be cut
> off because they are in their own files and surrounded by an if() guard in
> the CMakeLists.txt file.
>
> 5) Added LLVM-architecture detection if we are part of an LLVM build.
>
> 6) If you want, you can use LIBOMP_ARCH=i386 or LIBOMP_ARCH=x86_64 instead
> of LIBOMP_ARCH=32 or LIBOMP_ARCH=32e (although 32 and 32e still exist)
>
> 7) Unused functions/macros have been cut away.
>
>
>
> This is easier to review if you just patch and take a look at files
> runtime/CMakeLists.txt, runtime/src/CMakeLists.txt, cmake/Libomp*.cmake:
>
> $ patch –p1 –E < CMake_overhaul_v1.patch
>
> [-E removes empty files created by the patch]
>
>
>
> I’ve tested this out on x86 Linux, Mac, MIC, Windows and it works, but I
> can’t test it on other architectures.
>
>
>
> Leave feedback, recommendations.
>
>
>
> -- Johnny
>
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev
>




More information about the Openmp-dev mailing list