File tree Expand file tree Collapse file tree 16 files changed +30
-23
lines changed
Expand file tree Collapse file tree 16 files changed +30
-23
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.13.4)
22
3+ if (${ENABLE_DEVEL_PACKAGE} )
4+ set (DEVEL_PACKAGE "devel/" )
5+ endif ()
6+ if (${ENABLE_RUN_PACKAGE} )
7+ set (RUN_PACKAGE "runtime/" )
8+ endif ()
9+
310# Add cmake directory to search for custom cmake functions.
411set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /cmake ${CMAKE_MODULE_PATH} )
512
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ if (LLVM_ENABLE_DOXYGEN)
8585
8686 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
8787 install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /doxygen/html
88- DESTINATION docs/html)
88+ DESTINATION ${DEVEL_PACKAGE} docs/html)
8989 endif ()
9090endif ()
9191endif ()
Original file line number Diff line number Diff line change @@ -37,4 +37,4 @@ add_custom_target(ompd_gdb_plugin ALL
3737 DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /python-module/loadompd.py
3838 COMMENT "Building the OMPD GDB plugin" )
3939
40- install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /python-module/ompd DESTINATION ${ OPENMP_INSTALL_LIBDIR} )
40+ install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /python-module/ompd DESTINATION " ${DEVEL_PACKAGE} / ${ OPENMP_INSTALL_LIBDIR}" )
Original file line number Diff line number Diff line change @@ -56,6 +56,6 @@ if(${LIBOMP_USE_HWLOC})
5656endif ()
5757
5858INSTALL ( TARGETS ompd
59- LIBRARY DESTINATION ${OPENMP_INSTALL_LIBDIR}
60- ARCHIVE DESTINATION ${OPENMP_INSTALL_LIBDIR}
61- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR} " )
59+ LIBRARY DESTINATION ${RUN_PACKAGE}${ OPENMP_INSTALL_LIBDIR}
60+ ARCHIVE DESTINATION ${RUN_PACKAGE}${ OPENMP_INSTALL_LIBDIR}
61+ RUNTIME DESTINATION "${DEVEL_PACKAGE}${ CMAKE_INSTALL_BINDIR} " )
Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ function(compileDeviceRTLLibrary target_cpu target_name)
302302 add_dependencies ("omptarget.devicertl.${target_name} " "${bclib_target_name} " )
303303
304304 # Install bitcode library under the lib destination folder.
305- install (FILES ${CMAKE_CURRENT_BINARY_DIR} /${bclib_name} DESTINATION "${OPENMP_INSTALL_LIBDIR} " )
305+ install (FILES ${CMAKE_CURRENT_BINARY_DIR} /${bclib_name} DESTINATION "${DEVEL_PACKAGE}${ OPENMP_INSTALL_LIBDIR} " )
306306endfunction ()
307307
308308# Generate a Bitcode library for all the compute capabilities the user requested
Original file line number Diff line number Diff line change @@ -277,5 +277,5 @@ set(libname "omptarget-amdgcn")
277277foreach (mcpu ${amdgpu_mcpus} )
278278 set (bc_libname lib${libname} -${mcpu} .bc)
279279 build_bc_library(${mcpu} ${bc_libname} )
280- install (FILES ${CMAKE_CURRENT_BINARY_DIR} /${bc_libname} DESTINATION "${OPENMP_INSTALL_LIBDIR} " )
280+ install (FILES ${CMAKE_CURRENT_BINARY_DIR} /${bc_libname} DESTINATION "${DEVEL_PACKAGE}${ OPENMP_INSTALL_LIBDIR} " )
281281endforeach ()
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ foreach(sm ${nvptx_sm_list})
248248 ${LIBOMPTARGET_LIBRARY_DIR} )
249249
250250 # Install bitcode library under the lib destination folder.
251- install (FILES ${CMAKE_CURRENT_BINARY_DIR} /${bclib_name} DESTINATION "${OPENMP_INSTALL_LIBDIR} " )
251+ install (FILES ${CMAKE_CURRENT_BINARY_DIR} /${bclib_name} DESTINATION "${DEVEL_PACKAGE}${ OPENMP_INSTALL_LIBDIR} " )
252252endforeach ()
253253
254254# Test will be enabled if the building machine supports CUDA
Original file line number Diff line number Diff line change @@ -111,4 +111,4 @@ endforeach()
111111
112112#set(triple "nvptx-nvidia-cuda")
113113# Since libomptarget includes hostrpc, we only need to install hostrpc headers
114- install (FILES "${CMAKE_CURRENT_SOURCE_DIR} /src/hostrpc.h" DESTINATION include )
114+ install (FILES "${CMAKE_CURRENT_SOURCE_DIR} /src/hostrpc.h" DESTINATION ${DEVEL_PACKAGE} include )
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "${tmachine}$")
3535
3636 # Install plugin under the lib destination folder.
3737 install (TARGETS "omptarget.rtl.${tmachine_libname} "
38- LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR} " )
38+ LIBRARY DESTINATION "${RUN_PACKAGE}${ OPENMP_INSTALL_LIBDIR} " )
3939
4040 target_include_directories ( "omptarget.rtl.${tmachine_libname} " PRIVATE
4141 ${LIBOMPTARGET_INCLUDE_DIR}
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ add_dependencies(omptarget.rtl.amdgpu omptarget.devicertl.amdgpu)
7777
7878# Install plugin under the lib destination folder.
7979# When we build for debug, OPENMP_LIBDIR_SUFFIX get set to -debug
80- install (TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "lib${OPENMP_LIBDIR_SUFFIX} " )
80+ install (TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "${RUN_PACKAGE} lib${OPENMP_LIBDIR_SUFFIX} " )
8181set_property (TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH_USE_LINK_PATH ON )
8282
8383if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
You can’t perform that action at this time.
0 commit comments