Skip to content

Commit

Permalink
Bump min cxx standard to 17 (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
oandreeva-nv authored Jan 11, 2024
1 parent 7363cfe commit 46fb6dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ project(tritoncore LANGUAGES C CXX)
# TRITON_CORE_HEADERS_ONLY=OFF to also build libtritonserver.so.
option(TRITON_CORE_HEADERS_ONLY "Build only headers and stub" ON)

#
# Specifying min required C++ standard
#
set(TRITON_MIN_CXX_STANDARD 17 CACHE STRING "The minimum C++ standard which features are requested to build this target.")

#
# Triton Server API
Expand Down Expand Up @@ -120,8 +124,8 @@ add_library(
add_library(
TritonCore::triton-core-serverstub ALIAS triton-core-serverstub
)
target_compile_features(triton-core-serverstub PRIVATE cxx_std_${TRITON_MIN_CXX_STANDARD})

target_compile_features(triton-core-serverstub PRIVATE cxx_std_11)
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
message("Using MSVC as compiler, default target on Windows 10. "
"If the target system is not Windows 10, please update _WIN32_WINNT "
Expand Down Expand Up @@ -337,6 +341,7 @@ if(NOT TRITON_CORE_HEADERS_ONLY)
-DTRITON_ENABLE_AZURE_STORAGE:BOOL=${TRITON_ENABLE_AZURE_STORAGE}
-DTRITON_ENABLE_S3:BOOL=${TRITON_ENABLE_S3}
-DTRITON_ENABLE_ENSEMBLE:BOOL=${TRITON_ENABLE_ENSEMBLE}
-DTRITON_MIN_CXX_STANDARD:STRING=${TRITON_MIN_CXX_STANDARD}
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${TRITON_INSTALL_PREFIX}
-DTRITON_VERSION:STRING=${TRITON_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ add_library(
TritonCore::triton-core ALIAS triton-core
)

target_compile_features(triton-core PRIVATE cxx_std_11)
target_compile_features(triton-core PRIVATE cxx_std_${TRITON_MIN_CXX_STANDARD})
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
message("Using MSVC as compiler, default target on Windows 10. "
"If the target system is not Windows 10, please update _WIN32_WINNT "
Expand Down

0 comments on commit 46fb6dd

Please sign in to comment.