libomp/0001-CMake-Make-LIBOMP_HEAD...

30 lines
1.2 KiB
Diff

From 156a23f5d91c35edd888091b3d6416b755fa134d Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 16 May 2017 11:52:19 -0400
Subject: [PATCH] CMake: Make LIBOMP_HEADERS_INSTALL_PATH a cache variable when
bulding standalone
This way it can be overriden on the command line.
---
runtime/src/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/runtime/src/CMakeLists.txt b/runtime/src/CMakeLists.txt
index f9e63f4..2bf6796 100644
--- a/runtime/src/CMakeLists.txt
+++ b/runtime/src/CMakeLists.txt
@@ -282,8 +282,8 @@ add_dependencies(libomp-micro-tests libomp-test-deps)
# Install rules
# We want to install libomp in DESTDIR/CMAKE_INSTALL_PREFIX/lib
# We want to install headers in DESTDIR/CMAKE_INSTALL_PREFIX/include
-if(${OPENMP_STANDALONE_BUILD})
- set(LIBOMP_HEADERS_INSTALL_PATH include)
+if(${OPENMP_STANDALONE_BUILD})
+ set(LIBOMP_HEADERS_INSTALL_PATH include CACHE PATH "Install path for OpenMP headers")
else()
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION})
set(LIBOMP_HEADERS_INSTALL_PATH "${OPENMP_INSTALL_LIBDIR}/clang/${CLANG_VERSION}/include")
--
1.8.3.1