1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt
index b1ab39e..f1459ea 100755
--- a/hipamd/CMakeLists.txt
+++ b/hipamd/CMakeLists.txt
@@ -87,7 +87,20 @@ string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH})
list(GET VERSION_LIST 0 HIP_VERSION_PATCH)
set(HIP_VERSION_GITDATE 0)
-find_package(Git)
+# only look for git when we have a git repo
+if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git")
+ find_package(Git)
+endif()
+
+# FIXME: Two different version strings used.
+
+set(HIP_PACKAGING_VERSION_PATCH "0")
+set(HIP_VERSION_GITDATE "0")
+set(HIP_VERSION_PATCH "0")
+set(HIP_VERSION_GITHASH "0")
+set(HIP_VERSION_PATCH_GITHASH "0")
+set (HIP_LIB_VERSION_PATCH "0")
+
# FIXME: Two different version strings used.
# Below we use UNIX commands, not compatible with Windows.
@@ -132,9 +145,6 @@ if(GIT_FOUND)
else()
set(HIP_PACKAGING_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
endif()
-else()
- # FIXME: Some parts depend on this being set.
- set(HIP_PACKAGING_VERSION_PATCH "0")
endif()
## Debian package specific variables
@@ -177,7 +187,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR})
if (${ROCM_PATCH_VERSION} )
set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION})
else ()
- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH})
+ set (HIP_LIB_VERSION_PATCH "0")
endif ()
set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}")
if (DEFINED ENV{ROCM_RPATH})
@@ -484,34 +494,6 @@ if(CLANGFORMAT_EXE)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
endif()
-#############################
-# Testing steps
-#############################
-# HIT is not compatible with Windows
-if(NOT WIN32)
-set(HIP_ROOT_DIR ${CMAKE_CURRENT_BINARY_DIR})
-set(HIP_SRC_PATH ${CMAKE_CURRENT_SOURCE_DIR})
-if(HIP_PLATFORM STREQUAL "nvidia")
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_SRC_PATH}/include" "${HIP_ROOT_DIR}/include" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
-endif()
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_INCLUDE_DIR}/hip/" "${HIP_ROOT_DIR}/include/hip/" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
-execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_DIR}/cmake" "${HIP_ROOT_DIR}/cmake" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
-if(${RUN_HIT} EQUAL 0)
- execute_process(COMMAND "${CMAKE_COMMAND}" -E copy_directory "${HIP_COMMON_BIN_DIR}" "${HIP_ROOT_DIR}/bin" RESULT_VARIABLE RUN_HIT ERROR_QUIET)
-endif()
-if(HIP_CATCH_TEST EQUAL "1")
- enable_testing()
- add_subdirectory(${HIP_COMMON_DIR}/tests/catch ${PROJECT_BINARY_DIR}/catch)
-else()
- if(${RUN_HIT} EQUAL 0)
- set(CMAKE_MODULE_PATH "${HIP_ROOT_DIR}/cmake" ${CMAKE_MODULE_PATH})
- include(${HIP_COMMON_DIR}/tests/hit/HIT.cmake)
- include(${HIP_COMMON_DIR}/tests/Tests.cmake)
- else()
- message(STATUS "Testing targets will not be available. To enable them please ensure that the HIP installation directory is writeable. Use -DCMAKE_INSTALL_PREFIX to specify a suitable location")
- endif()
-endif()
-endif()
#############################
# Code analysis
diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in
index 2edce6c..ee7d70c 100755
--- a/hipamd/hip-config.cmake.in
+++ b/hipamd/hip-config.cmake.in
@@ -212,7 +212,7 @@ if(HIP_RUNTIME MATCHES "rocclr")
if(NOT WIN32)
set_target_properties(hip::device PROPERTIES
- INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
+ INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/../include"
)
endif()
@@ -271,7 +271,6 @@ if(HIP_COMPILER STREQUAL "clang")
endif()
# Add support for __fp16 and _Float16, explicitly link with compiler-rt
- hip_add_interface_link_flags(hip::host -L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64)
hip_add_interface_link_flags(hip::device -L\"${HIP_CLANG_INCLUDE_PATH}/../lib/linux\" -lclang_rt.builtins-x86_64)
endif()
|