[Openmp-commits] [openmp] 6f2ed8f - [OpenMP] Install ompt-multiplex.h alongside omp.h
via Openmp-commits
openmp-commits at lists.llvm.org
Fri Sep 9 00:47:23 PDT 2022
Author: serge-sans-paille
Date: 2022-09-09T09:42:08+02:00
New Revision: 6f2ed8fd3f234316e3d250174e131f0ce85ca0ae
URL: https://github.com/llvm/llvm-project/commit/6f2ed8fd3f234316e3d250174e131f0ce85ca0ae
DIFF: https://github.com/llvm/llvm-project/commit/6f2ed8fd3f234316e3d250174e131f0ce85ca0ae.diff
LOG: [OpenMP] Install ompt-multiplex.h alongside omp.h
The default install direction may not be in the compiler search path.
Differential Revision: https://reviews.llvm.org/D133420
Added:
Modified:
openmp/CMakeLists.txt
openmp/runtime/src/CMakeLists.txt
openmp/tools/multiplex/CMakeLists.txt
Removed:
################################################################################
diff --git a/openmp/CMakeLists.txt b/openmp/CMakeLists.txt
index a038dc09be2c5..502a06ed916e5 100644
--- a/openmp/CMakeLists.txt
+++ b/openmp/CMakeLists.txt
@@ -75,6 +75,14 @@ option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading."
${ENABLE_LIBOMPTARGET})
option(OPENMP_ENABLE_LIBOMP_PROFILING "Enable time profiling for libomp." OFF)
+# Header install location
+if(${OPENMP_STANDALONE_BUILD})
+ set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
+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")
+endif()
+
# Build host runtime library, after LIBOMPTARGET variables are set since they are needed
# to enable time profiling support in the OpenMP runtime.
add_subdirectory(runtime)
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index df1ca9d9088b8..d1e79b2e0c7f6 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -355,12 +355,6 @@ add_dependencies(libomp-micro-tests libomp-test-deps)
# Install rules
# We want to install libomp in ${DESTDIR}/${CMAKE_INSTALL_FULL_LIBDIR}
# We want to install headers in ${DESTDIR}/${CMAKE_INSTALL_FULL_INCLUDEDIR}
-if(${OPENMP_STANDALONE_BUILD})
- set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
-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")
-endif()
if(WIN32)
install(TARGETS omp RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(TARGETS ${LIBOMP_IMP_LIB_TARGET} ARCHIVE DESTINATION "${OPENMP_INSTALL_LIBDIR}")
diff --git a/openmp/tools/multiplex/CMakeLists.txt b/openmp/tools/multiplex/CMakeLists.txt
index 8b50e95899cc4..afc7fc5aa44ad 100644
--- a/openmp/tools/multiplex/CMakeLists.txt
+++ b/openmp/tools/multiplex/CMakeLists.txt
@@ -4,7 +4,7 @@ if(LIBOMP_OMPT_SUPPORT)
add_library(ompt-multiplex INTERFACE)
target_include_directories(ompt-multiplex INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
- install(FILES ompt-multiplex.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+ install(FILES ompt-multiplex.h DESTINATION "${LIBOMP_HEADERS_INSTALL_PATH}")
add_subdirectory(tests)
endif()
More information about the Openmp-commits
mailing list