[Openmp-commits] [PATCH] D24563: [openmp] [cmake] Make libgomp & libiomp5 alias install optional
Michał Górny via Openmp-commits
openmp-commits at lists.llvm.org
Wed Sep 14 08:12:27 PDT 2016
mgorny created this revision.
mgorny added a reviewer: jlpeyton.
mgorny added a subscriber: openmp-commits.
Herald added subscribers: mgorny, beanz.
Introduce a new LIBOMP_INSTALL_VARIABLES cache variable that can be used to disable creating libgomp and libiomp5 aliases on 'make install'. Those aliases are undesired e.g. on Gentoo systems where libomp is used purely by clang.
https://reviews.llvm.org/D24563
Files:
runtime/CMakeLists.txt
runtime/src/CMakeLists.txt
Index: runtime/src/CMakeLists.txt
===================================================================
--- runtime/src/CMakeLists.txt
+++ runtime/src/CMakeLists.txt
@@ -305,13 +305,15 @@
install(TARGETS omp ${LIBOMP_INSTALL_KIND} DESTINATION lib${LIBOMP_LIBDIR_SUFFIX})
- # Create aliases (symlinks) of the library for backwards compatibility
- 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
- \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})")
- endforeach()
+ if(${LIBOMP_INSTALL_ALIASES})
+ # Create aliases (symlinks) of the library for backwards compatibility
+ 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
+ \$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/lib${LIBOMP_LIBDIR_SUFFIX})")
+ endforeach()
+ endif()
endif()
install(
FILES
Index: runtime/CMakeLists.txt
===================================================================
--- runtime/CMakeLists.txt
+++ runtime/CMakeLists.txt
@@ -340,6 +340,10 @@
set(LIBOMP_LIB_FILE ${LIBOMP_LIB_NAME}${LIBOMP_LIBRARY_SUFFIX})
+# Optional backwards compatibility aliases.
+set(LIBOMP_INSTALL_ALIASES TRUE CACHE BOOL
+ "Install libgomp and libiomp5 library aliases for backwards compatibility")
+
# Print configuration after all variables are set.
if(${LIBOMP_STANDALONE_BUILD})
libomp_say("Operating System -- ${CMAKE_SYSTEM_NAME}")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24563.71365.patch
Type: text/x-patch
Size: 1756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160914/7d196513/attachment.bin>
More information about the Openmp-commits
mailing list