[OpenMP] Fix installation to old resource dir
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 14 Nov 2022 14:11:33 +0000 (08:11 -0600)
committerJoseph Huber <jhuber6@vols.utk.edu>
Mon, 14 Nov 2022 14:21:46 +0000 (08:21 -0600)
Summary:
The changes in D125860 renamed the old resource directory to only use
the major version. This was not updated for the OpenMP project, causing
OpenMP resources to still be installed in the old `major.minor.rev`
folder. This lead to problems including the header files.

fixes #58966

openmp/CMakeLists.txt

index 502a06e..7f6ea8e 100644 (file)
@@ -79,7 +79,7 @@ option(OPENMP_ENABLE_LIBOMP_PROFILING "Enable time profiling for libomp." OFF)
 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})
+  string(REGEX MATCH "[0-9]+" CLANG_VERSION ${PACKAGE_VERSION})
   set(LIBOMP_HEADERS_INSTALL_PATH "${OPENMP_INSTALL_LIBDIR}/clang/${CLANG_VERSION}/include")
 endif()