File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -471,13 +471,19 @@ else()
471471 if (${LIBOMP_INSTALL_ALIASES} )
472472 # Create aliases (symlinks) of the library for backwards compatibility
473473 extend_path(outdir "${CMAKE_INSTALL_PREFIX} " "${OPENMP_INSTALL_LIBDIR} " )
474+ if (AIX)
475+ # On AIX, libomp.a is the name for both static and shared objects.
476+ set (LIBRARY_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX} )
477+ else ()
478+ set (LIBRARY_SUFFIX ${LIBOMP_LIBRARY_SUFFIX} )
479+ endif ()
474480 set (LIBOMP_ALIASES "libgomp;libiomp5" )
475481 foreach (alias IN LISTS LIBOMP_ALIASES)
476- install (CODE "execute_process(COMMAND \"\$ {CMAKE_COMMAND}\" -E create_symlink \" ${LIBOMP_LIB_FILE } \"
477- \" ${alias}${LIBOMP_LIBRARY_SUFFIX } \" WORKING_DIRECTORY
482+ install (CODE "execute_process(COMMAND \"\$ {CMAKE_COMMAND}\" -E create_symlink \" ${LIBOMP_LIB_NAME}${LIBRARY_SUFFIX } \"
483+ \" ${alias}${LIBRARY_SUFFIX } \" WORKING_DIRECTORY
478484 \"\$ ENV{DESTDIR}${outdir} \" )" )
479485 endforeach ()
480- if (LIBOMP_ENABLE_SHARED)
486+ if (LIBOMP_ENABLE_SHARED AND NOT AIX )
481487 install (CODE "execute_process(COMMAND \"\$ {CMAKE_COMMAND}\" -E create_symlink \" ${LIBOMP_LIB_FILE} \"
482488 \" ${VERSIONED_LIBGOMP_NAME} \" WORKING_DIRECTORY
483489 \"\$ ENV{DESTDIR}${outdir} \" )" )
You can’t perform that action at this time.
0 commit comments