@@ -16,10 +16,16 @@ therock_cmake_subproject_activate(rocm-cmake)
16
16
# rocm-core
17
17
################################################################################
18
18
19
+ if (WIN32 )
20
+ set (_shared_libs_arg "OFF" )
21
+ else ()
22
+ set (_shared_libs_arg "ON" )
23
+ endif ()
24
+
19
25
therock_cmake_subproject_declare(rocm-core
20
26
EXTERNAL_SOURCE_DIR "rocm-core"
21
27
CMAKE_ARGS
22
- "-DBUILD_SHARED_LIBS=ON "
28
+ "-DBUILD_SHARED_LIBS=${_shared_libs_arg} "
23
29
"-DROCM_VERSION=${ROCM_MAJOR_VERSION} .${ROCM_MINOR_VERSION} .${ROCM_PATCH_VERSION} "
24
30
)
25
31
therock_cmake_subproject_glob_c_sources(rocm-core
@@ -33,6 +39,8 @@ therock_cmake_subproject_activate(rocm-core)
33
39
# rocm_smi_lib
34
40
################################################################################
35
41
42
+ if (NOT WIN32 ) # TODO(#36): Enable on Windows and/or make subproject inclusion generally optional
43
+
36
44
therock_cmake_subproject_declare(rocm_smi_lib
37
45
EXTERNAL_SOURCE_DIR "rocm_smi_lib"
38
46
INTERFACE_LINK_DIRS
@@ -46,12 +54,16 @@ therock_cmake_subproject_glob_c_sources(rocm_smi_lib
46
54
therock_cmake_subproject_provide_package(rocm_smi_lib rocm_smi lib/cmake/rocm_smi)
47
55
therock_cmake_subproject_activate(rocm_smi_lib)
48
56
57
+ endif ()
58
+
49
59
50
60
################################################################################
51
61
# rocprofiler-register
52
62
# This is a stub that helps runtime libraries and profiles rendezvous
53
63
################################################################################
54
64
65
+ if (NOT WIN32 ) # TODO(#36): Enable on Windows and/or make subproject inclusion generally optional
66
+
55
67
therock_cmake_subproject_declare(rocprofiler-register
56
68
EXTERNAL_SOURCE_DIR "rocprofiler-register"
57
69
INTERFACE_LINK_DIRS
@@ -66,6 +78,8 @@ therock_cmake_subproject_provide_package(rocprofiler-register
66
78
rocprofiler-register lib/cmake/rocprofiler-register)
67
79
therock_cmake_subproject_activate(rocprofiler-register)
68
80
81
+ endif ()
82
+
69
83
70
84
################################################################################
71
85
# rocm-half
@@ -87,6 +101,13 @@ therock_cmake_subproject_activate(rocm-half)
87
101
# Artifacts
88
102
################################################################################
89
103
104
+ set (_optional_subproject_deps)
105
+ if (NOT WIN32 )
106
+ # TODO(#36): Enable on Windows and/or make subproject inclusion generally optional
107
+ list (APPEND _optional_subproject_deps rocm_smi_lib)
108
+ list (APPEND _optional_subproject_deps rocprofiler-register)
109
+ endif ()
110
+
90
111
therock_provide_artifact(base
91
112
TARGET_NEUTRAL
92
113
DESCRIPTOR artifact.toml
@@ -98,9 +119,8 @@ therock_provide_artifact(base
98
119
run
99
120
test
100
121
SUBPROJECT_DEPS
122
+ ${_optional_subproject_deps}
101
123
rocm-cmake
102
124
rocm-core
103
- rocm_smi_lib
104
- rocprofiler-register
105
125
rocm-half
106
126
)
0 commit comments