summaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorKelvin Li <kli@ca.ibm.com>2025-11-20 09:08:57 -0500
committerGitHub <noreply@github.com>2025-11-20 09:08:57 -0500
commit4544ff68dc53ad427cfdbc9017d7328f09318484 (patch)
tree7d01d161fc62c6c11174aa0b303f351c8171cf30 /openmp
parentaeba7a8adef9a8ea624aa5be3b95a8a9fb5a17dd (diff)
[OpenMP][AIX] Not to create symbolic links to libomp.so in install step (NFC) (#168585)
Commit bb563b1 handles the links in the build directory but misses the case in the install step. This patch is to link only the libomp.a on AIX.
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/src/CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index 5dd7f4b33612..3202bdcd1352 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -471,13 +471,19 @@ else()
if(${LIBOMP_INSTALL_ALIASES})
# Create aliases (symlinks) of the library for backwards compatibility
extend_path(outdir "${CMAKE_INSTALL_PREFIX}" "${OPENMP_INSTALL_LIBDIR}")
+ if(AIX)
+ # On AIX, libomp.a is the name for both static and shared objects.
+ set(LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
+ else()
+ set(LIBRARY_SUFFIX ${LIBOMP_LIBRARY_SUFFIX})
+ endif()
set(LIBOMP_ALIASES "libgomp;libiomp5")
foreach(alias IN LISTS LIBOMP_ALIASES)
- install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
- \"${alias}${LIBOMP_LIBRARY_SUFFIX}\" WORKING_DIRECTORY
+ install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_NAME}${LIBRARY_SUFFIX}\"
+ \"${alias}${LIBRARY_SUFFIX}\" WORKING_DIRECTORY
\"\$ENV{DESTDIR}${outdir}\")")
endforeach()
- if(LIBOMP_ENABLE_SHARED)
+ if(LIBOMP_ENABLE_SHARED AND NOT AIX)
install(CODE "execute_process(COMMAND \"\${CMAKE_COMMAND}\" -E create_symlink \"${LIBOMP_LIB_FILE}\"
\"${VERSIONED_LIBGOMP_NAME}\" WORKING_DIRECTORY
\"\$ENV{DESTDIR}${outdir}\")")