Add LIBOMP_ENABLE_SHARED option for CMake
authorJonathan Peyton <jonathan.l.peyton@intel.com>
Thu, 4 Feb 2016 19:29:35 +0000 (19:29 +0000)
committerJonathan Peyton <jonathan.l.peyton@intel.com>
Thu, 4 Feb 2016 19:29:35 +0000 (19:29 +0000)
commitfd74f90072f48a914df98ed46d0731c661149187
treec40193e11209086be19f25181612054662f5e59f
parent7823fd2535ba0864962ff9cfbddca31272de420c
Add LIBOMP_ENABLE_SHARED option for CMake

When building executables for Cray supercomputers, statically-linked executables
are preferred. This patch makes it possible to build the OpenMP runtime as an
archive for building statically-linked executables.  The patch adds the flag
LIBOMP_ENABLE_SHARED, which defaults to true. When true, a build of the OpenMP
runtime yields dynamic libraries. When false, a build of the OpenMP runtime
yields static libraries. There is no setting that allows both kinds of libraries
to be built.

Patch by John Mellor-Crummey

Differential Revision: http://reviews.llvm.org/D16525

llvm-svn: 259817
openmp/runtime/Build_With_CMake.txt
openmp/runtime/CMakeLists.txt
openmp/runtime/src/CMakeLists.txt