@@ -390,7 +390,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
390
390
# 1.2 is Clang's default OpenCL C language standard to compile for.
391
391
set ( opencl_lang_std "CL1.2" )
392
392
393
- if ( ${ DARCH} STREQUAL spirv )
393
+ if ( DARCH STREQUAL spirv )
394
394
set ( opencl_lang_std "CL3.0" )
395
395
set ( build_flags -O0 -finline-hint-functions -DCLC_SPIRV )
396
396
set ( opt_flags )
@@ -399,7 +399,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
399
399
if ( ARCH STREQUAL spirv64 )
400
400
set ( MACRO_ARCH SPIRV64 )
401
401
endif ()
402
- elseif ( ${ DARCH} STREQUAL clspv )
402
+ elseif ( DARCH STREQUAL clspv )
403
403
# Refer to https://github.com/google/clspv for OpenCL version.
404
404
set ( opencl_lang_std "CL3.0" )
405
405
set ( build_flags "-Wno-unknown-assumption" -DCLC_CLSPV )
@@ -408,13 +408,13 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
408
408
if ( ARCH STREQUAL clspv64 )
409
409
set ( MACRO_ARCH CLSPV64 )
410
410
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.
413
413
set ( opencl_lang_std "CL3.0" )
414
414
set ( build_flags )
415
415
set ( opt_flags -O3 )
416
416
set ( MACRO_ARCH ${ARCH} )
417
- elseif ( ${ DARCH} STREQUAL amdgcn OR ${ DARCH} STREQUAL amdgcn-amdhsa )
417
+ elseif ( DARCH STREQUAL amdgcn OR DARCH STREQUAL amdgcn-amdhsa )
418
418
# Refer to https://github.com/ROCm/clr/tree/develop/opencl for OpenCL version.
419
419
set ( opencl_lang_std "CL2.0" )
420
420
set ( build_flags )
0 commit comments