File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,9 @@ cmake_minimum_required (VERSION 3.18)
28
28
29
29
project (tritonpytorchbackend LANGUAGES C CXX)
30
30
31
+ # Use C++17 standard as Triton's minimum required.
32
+ set (TRITON_MIN_CXX_STANDARD 17 CACHE STRING "The minimum C++ standard which features are requested to build this target." )
33
+
31
34
#
32
35
# Options
33
36
#
@@ -295,7 +298,7 @@ endif() # TRITON_PYTORCH_DOCKER_BUILD
295
298
# Need to turn off -Werror due to Torchvision vision.h extern initialization
296
299
# Unfortunately gcc does not provide a specific flag to ignore the specific
297
300
# warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45977
298
- target_compile_features (triton-pytorch-backend PRIVATE cxx_std_11 )
301
+ target_compile_features (triton-pytorch-backend PRIVATE cxx_std_ ${TRITON_MIN_CXX_STANDARD} )
299
302
target_compile_options (
300
303
triton-pytorch-backend PRIVATE
301
304
$<$<OR :$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:
You can’t perform that action at this time.
0 commit comments