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 1
1
cmake_minimum_required (VERSION 3.13.4 )
2
2
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
+
3
10
# Add cmake directory to search for custom cmake functions.
4
11
set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} /cmake ${CMAKE_MODULE_PATH} )
5
12
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ if (LLVM_ENABLE_DOXYGEN)
85
85
86
86
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY )
87
87
install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} /doxygen/html
88
- DESTINATION docs/html )
88
+ DESTINATION ${DEVEL_PACKAGE} docs/html )
89
89
endif ()
90
90
endif ()
91
91
endif ()
Original file line number Diff line number Diff line change @@ -37,4 +37,4 @@ add_custom_target(ompd_gdb_plugin ALL
37
37
DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /python-module/loadompd.py
38
38
COMMENT "Building the OMPD GDB plugin" )
39
39
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})
56
56
endif ()
57
57
58
58
INSTALL ( 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)
302
302
add_dependencies ("omptarget.devicertl.${target_name} " "${bclib_target_name} " )
303
303
304
304
# 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} " )
306
306
endfunction ()
307
307
308
308
# 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")
277
277
foreach (mcpu ${amdgpu_mcpus} )
278
278
set (bc_libname lib${libname}-${mcpu}.bc )
279
279
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} " )
281
281
endforeach ()
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ foreach(sm ${nvptx_sm_list})
248
248
${LIBOMPTARGET_LIBRARY_DIR} )
249
249
250
250
# 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} " )
252
252
endforeach ()
253
253
254
254
# 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()
111
111
112
112
#set(triple "nvptx-nvidia-cuda")
113
113
# 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}$")
35
35
36
36
# Install plugin under the lib destination folder.
37
37
install (TARGETS "omptarget.rtl.${tmachine_libname} "
38
- LIBRARY DESTINATION "${OPENMP_INSTALL_LIBDIR} " )
38
+ LIBRARY DESTINATION "${RUN_PACKAGE}${ OPENMP_INSTALL_LIBDIR} " )
39
39
40
40
target_include_directories ( "omptarget.rtl.${tmachine_libname} " PRIVATE
41
41
${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)
77
77
78
78
# Install plugin under the lib destination folder.
79
79
# 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} " )
81
81
set_property (TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH_USE_LINK_PATH ON )
82
82
83
83
if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
You can’t perform that action at this time.
0 commit comments