@@ -26,6 +26,7 @@ def do_configure(args):
26
26
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti;libdevice'
27
27
libclc_targets_to_build = ''
28
28
sycl_build_pi_cuda = 'OFF'
29
+ sycl_werror = 'ON'
29
30
llvm_enable_assertions = 'ON'
30
31
llvm_enable_doxygen = 'OFF'
31
32
llvm_enable_sphinx = 'OFF'
@@ -42,6 +43,9 @@ def do_configure(args):
42
43
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
43
44
sycl_build_pi_cuda = 'ON'
44
45
46
+ if args .no_werror :
47
+ sycl_werror = 'OFF'
48
+
45
49
if args .no_assertions :
46
50
llvm_enable_assertions = 'OFF'
47
51
@@ -69,7 +73,7 @@ def do_configure(args):
69
73
"-DLIBCLC_TARGETS_TO_BUILD={}" .format (libclc_targets_to_build ),
70
74
"-DSYCL_BUILD_PI_CUDA={}" .format (sycl_build_pi_cuda ),
71
75
"-DLLVM_BUILD_TOOLS=ON" ,
72
- "-DSYCL_ENABLE_WERROR=ON" ,
76
+ "-DSYCL_ENABLE_WERROR={}" . format ( sycl_werror ) ,
73
77
"-DCMAKE_INSTALL_PREFIX={}" .format (install_dir ),
74
78
"-DSYCL_INCLUDE_TESTS=ON" , # Explicitly include all kinds of SYCL tests.
75
79
"-DLLVM_ENABLE_DOXYGEN={}" .format (llvm_enable_doxygen ),
@@ -78,7 +82,7 @@ def do_configure(args):
78
82
"-DSYCL_ENABLE_XPTI_TRACING=ON" # Explicitly turn on XPTI tracing
79
83
]
80
84
81
- if not args .no_ocl :
85
+ if args .system_ocl :
82
86
cmake_cmd .extend ([
83
87
"-DOpenCL_INCLUDE_DIR={}" .format (ocl_header_dir ),
84
88
"-DOpenCL_LIBRARY={}" .format (icd_loader_lib )])
@@ -120,7 +124,8 @@ def main():
120
124
parser .add_argument ("--cuda" , action = 'store_true' , help = "switch from OpenCL to CUDA" )
121
125
parser .add_argument ("--no-assertions" , action = 'store_true' , help = "build without assertions" )
122
126
parser .add_argument ("--docs" , action = 'store_true' , help = "build Doxygen documentation" )
123
- parser .add_argument ("--no-ocl" , action = 'store_true' , help = "download OpenCL deps via CMake" )
127
+ parser .add_argument ("--system-ocl" , action = 'store_true' , help = "use OpenCL deps from system (no download)" )
128
+ parser .add_argument ("--no-werror" , action = 'store_true' , help = "Don't treat warnings as errors" )
124
129
parser .add_argument ("--shared-libs" , action = 'store_true' , help = "Build shared libraries" )
125
130
parser .add_argument ("--cmake-opt" , action = 'append' , help = "Additional CMake option not configured via script parameters" )
126
131
0 commit comments