Skip to content

Commit 0931f9d

Browse files
authored
Bumping min required cxx standard to 17 (#122)
1 parent 7468381 commit 0931f9d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ cmake_minimum_required (VERSION 3.18)
2828

2929
project(tritonpytorchbackend LANGUAGES C CXX)
3030

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+
3134
#
3235
# Options
3336
#
@@ -295,7 +298,7 @@ endif() # TRITON_PYTORCH_DOCKER_BUILD
295298
# Need to turn off -Werror due to Torchvision vision.h extern initialization
296299
# Unfortunately gcc does not provide a specific flag to ignore the specific
297300
# 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})
299302
target_compile_options(
300303
triton-pytorch-backend PRIVATE
301304
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:

0 commit comments

Comments
 (0)