Skip to content

Commit 937f03f

Browse files
cmake: fix setting CMAKE_HIP_FLAGS (#3155)
Fix #2523 (comment). [`CMAKE_<LANG>_FLAGS`](https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_FLAGS.html#variable:CMAKE_%3CLANG%3E_FLAGS) is a string, so when using `set`, we should use quotes. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent efe0962 commit 937f03f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/lib/src/gpu/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ elseif(USE_ROCM_TOOLKIT)
7373

7474
message(STATUS "HIP major version is " ${hip_VERSION_MAJOR})
7575

76-
set(CMAKE_HIP_FLAGS -fno-gpu-rdc ${CMAKE_HIP_FLAGS}) # --amdgpu-target=gfx906
76+
set(CMAKE_HIP_FLAGS "-fno-gpu-rdc ${CMAKE_HIP_FLAGS}"
77+
)# --amdgpu-target=gfx906
7778
if(hip_VERSION VERSION_LESS 3.5.1)
78-
set(CMAKE_HIP_FLAGS -hc ${CMAKE_HIP_FLAGS})
79+
set(CMAKE_HIP_FLAGS "-hc ${CMAKE_HIP_FLAGS}")
7980
endif()
8081

8182
file(GLOB SOURCE_FILES "*.cu")

0 commit comments

Comments
 (0)