File tree Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Expand file tree Collapse file tree 5 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ if( CMAKE_CXX_COMPILER MATCHES ".*/hipcc$" )
6363 string (REGEX MATCH "[A-Za-z]+" CXX_VERSION_STRING ${TMP_CXX_VERSION} )
6464endif ()
6565
66- if ( CXX_VERSION_STRING MATCHES "clang" )
66+ if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
6767 message ( STATUS "Use hip-clang to build for amdgpu backend" )
6868# set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fallow-half-arguments-and-returns" )
6969 set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__HIP_HCC_COMPAT_MODE__=1" )
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ else( )
6868 target_link_libraries ( rocblas-bench PRIVATE hip::host hip::device )
6969endif ( )
7070
71- if ( CMAKE_COMPILER_IS_GNUCXX OR CXX_VERSION_STRING MATCHES "clang " )
71+ if ( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang " )
7272 # GCC or hip-clang needs specific flags to turn on f16c intrinsics
7373 target_compile_options ( rocblas-bench PRIVATE -mf16c )
7474endif ( )
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ add_custom_target( rocblas-test-data
159159
160160add_dependencies ( rocblas-test rocblas-test -data rocblas-common )
161161
162- if ( CMAKE_COMPILER_IS_GNUCXX OR CXX_VERSION_STRING MATCHES "clang" )
162+ if ( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
163163 # GCC or hip-clang needs specific flag to turn on f16c intrinsics
164164 target_compile_options ( rocblas-test PRIVATE -mf16c )
165165endif ( )
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ foreach( exe ${sample_list_all} )
7070 #target_compile_definitions( ${exe} PRIVATE __HIP_PLATFORM_HCC__ )
7171 endif ( )
7272
73- if ( CMAKE_COMPILER_IS_GNUCXX OR CXX_VERSION_STRING MATCHES "clang" )
73+ if ( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
7474 # GCC or hip-clang needs specific flags to turn on f16c intrinsics
7575 target_compile_options ( ${exe} PRIVATE -mf16c )
7676 endif ( )
Original file line number Diff line number Diff line change 11# ########################################################################
2- # Copyright 2016-2020 Advanced Micro Devices, Inc.
2+ # Copyright 2016-2021 Advanced Micro Devices, Inc.
33# ########################################################################
44
55# The following helper functions wrap common cmake functions. They are
@@ -154,7 +154,7 @@ endif( )
154154set ( CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION "\$ {CPACK_PACKAGING_INSTALL_PREFIX}" "\$ {CPACK_PACKAGING_INSTALL_PREFIX}/include" "\$ {CPACK_PACKAGING_INSTALL_PREFIX}/lib" )
155155
156156# Give rocblas compiled for CUDA backend a different name
157- if ( CXX_VERSION_STRING MATCHES "clang " )
157+ if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang " )
158158 set ( package_name rocblas )
159159else ( )
160160 set ( package_name rocblas-alt )
You can’t perform that action at this time.
0 commit comments