Skip to content

Commit

Permalink
added -hc option explicitly for all clients build to support compiler…
Browse files Browse the repository at this point in the history
… changes (#238)
  • Loading branch information
feizheng10 committed Aug 15, 2019
1 parent f39c61e commit 6920006
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion clients/rider/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ endif( )
if( CMAKE_CXX_COMPILER MATCHES ".*/hcc$" )
# Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
# "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
target_compile_options( rocfft-rider PRIVATE -Wno-unused-command-line-argument )
target_compile_options( rocfft-rider PRIVATE -Wno-unused-command-line-argument -hc)

# foreach( target ${AMDGPU_TARGETS} )
# target_link_libraries( rocfft-rider PRIVATE --amdgpu-target=${target} )
Expand Down
2 changes: 1 addition & 1 deletion clients/samples/fixed-16/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ foreach( sample ${sample_list} )
if( CMAKE_CXX_COMPILER MATCHES ".*/hcc$" )
# Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
# "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
target_compile_options( ${sample} PRIVATE -Wno-unused-command-line-argument )
target_compile_options( ${sample} PRIVATE -Wno-unused-command-line-argument -hc)

# foreach( target ${AMDGPU_TARGETS} )
# target_link_libraries( ${sample} PRIVATE --amdgpu-target=${target} )
Expand Down
2 changes: 1 addition & 1 deletion clients/samples/fixed-large/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ foreach( sample ${sample_list} )
if( CMAKE_CXX_COMPILER MATCHES ".*/hcc$" )
# Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
# "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
target_compile_options( ${sample} PRIVATE -Wno-unused-command-line-argument )
target_compile_options( ${sample} PRIVATE -Wno-unused-command-line-argument -hc)

# foreach( target ${AMDGPU_TARGETS} )
# target_link_libraries( ${sample} PRIVATE --amdgpu-target=${target} )
Expand Down
5 changes: 1 addition & 4 deletions clients/samples/hipfft/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ find_package(rocfft)
set( sample_list hipfft_1d_z2z hipfft_1d_d2z hipfft_2d_z2z hipfft_2d_d2z hipfft_3d_z2z
hipfft_3d_d2z hipfft_planmany_2d_z2z hipfft_planmany_2d_r2c hipfft_setworkarea)


set(CMAKE_CXX_FLAG = "${CMAKE_CXX_FLAG} -hc")

foreach( sample ${sample_list} )

add_executable( ${sample} ${sample}.cpp )
Expand Down Expand Up @@ -61,7 +58,7 @@ foreach( sample ${sample_list} )
if( CMAKE_CXX_COMPILER MATCHES ".*/hcc$" )
# Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
# "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
target_compile_options( ${sample} PRIVATE -Wno-unused-command-line-argument )
target_compile_options( ${sample} PRIVATE -Wno-unused-command-line-argument -hc)

# foreach( target ${AMDGPU_TARGETS} )
# target_link_libraries( ${sample} PRIVATE --amdgpu-target=${target} )
Expand Down
2 changes: 1 addition & 1 deletion clients/selftest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ endif( )
if( CMAKE_CXX_COMPILER MATCHES ".*/hcc$" )
# Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
# "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
target_compile_options( rocfft-selftest PRIVATE -Wno-unused-command-line-argument )
target_compile_options( rocfft-selftest PRIVATE -Wno-unused-command-line-argument -hc)

# foreach( target ${AMDGPU_TARGETS} )
# target_link_libraries( rocfft-selftest PRIVATE --amdgpu-target=${target} )
Expand Down
2 changes: 1 addition & 1 deletion clients/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ endif( )
if( CMAKE_CXX_COMPILER MATCHES ".*/hcc$" )
# Remove following when hcc is fixed; hcc emits following spurious warning ROCm v1.6.1
# "clang-5.0: warning: argument unused during compilation: '-isystem /opt/rocm/include'"
target_compile_options( rocfft-test PRIVATE -Wno-unused-command-line-argument )
target_compile_options( rocfft-test PRIVATE -Wno-unused-command-line-argument -hc)

# foreach( target ${AMDGPU_TARGETS} )
# target_link_libraries( rocfft-test PRIVATE --amdgpu-target=${target} )
Expand Down

0 comments on commit 6920006

Please sign in to comment.