Skip to content

Commit

Permalink
cmake: fix setting CMAKE_HIP_FLAGS (#3155)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
njzjz and pre-commit-ci[bot] authored Jan 20, 2024
1 parent efe0962 commit 937f03f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/lib/src/gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ elseif(USE_ROCM_TOOLKIT)

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

set(CMAKE_HIP_FLAGS -fno-gpu-rdc ${CMAKE_HIP_FLAGS}) # --amdgpu-target=gfx906
set(CMAKE_HIP_FLAGS "-fno-gpu-rdc ${CMAKE_HIP_FLAGS}"
)# --amdgpu-target=gfx906
if(hip_VERSION VERSION_LESS 3.5.1)
set(CMAKE_HIP_FLAGS -hc ${CMAKE_HIP_FLAGS})
set(CMAKE_HIP_FLAGS "-hc ${CMAKE_HIP_FLAGS}")
endif()

file(GLOB SOURCE_FILES "*.cu")
Expand Down

0 comments on commit 937f03f

Please sign in to comment.