@@ -390,7 +390,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
390390 # 1.2 is Clang's default OpenCL C language standard to compile for.
391391 set ( opencl_lang_std "CL1.2" )
392392
393- if ( ${ DARCH} STREQUAL spirv )
393+ if ( DARCH STREQUAL spirv )
394394 set ( opencl_lang_std "CL3.0" )
395395 set ( build_flags -O0 -finline-hint-functions -DCLC_SPIRV )
396396 set ( opt_flags )
@@ -399,7 +399,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
399399 if ( ARCH STREQUAL spirv64 )
400400 set ( MACRO_ARCH SPIRV64 )
401401 endif ()
402- elseif ( ${ DARCH} STREQUAL clspv )
402+ elseif ( DARCH STREQUAL clspv )
403403 # Refer to https://github.com/google/clspv for OpenCL version.
404404 set ( opencl_lang_std "CL3.0" )
405405 set ( build_flags "-Wno-unknown-assumption" -DCLC_CLSPV )
@@ -408,13 +408,13 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
408408 if ( ARCH STREQUAL clspv64 )
409409 set ( MACRO_ARCH CLSPV64 )
410410 endif ()
411- elseif ( ${ DARCH} STREQUAL nvptx )
412- # Refer to https://www.khronos.org /opencl/ for OpenCL version in NV implementation .
411+ elseif ( DARCH STREQUAL nvptx )
412+ # Refer to https://developer.nvidia.com /opencl for OpenCL version.
413413 set ( opencl_lang_std "CL3.0" )
414414 set ( build_flags )
415415 set ( opt_flags -O3 )
416416 set ( MACRO_ARCH ${ARCH} )
417- elseif ( ${ DARCH} STREQUAL amdgcn OR ${ DARCH} STREQUAL amdgcn-amdhsa )
417+ elseif ( DARCH STREQUAL amdgcn OR DARCH STREQUAL amdgcn-amdhsa )
418418 # Refer to https://github.com/ROCm/clr/tree/develop/opencl for OpenCL version.
419419 set ( opencl_lang_std "CL2.0" )
420420 set ( build_flags )
0 commit comments