Skip to content

Commit

Permalink
Revert "Revert "Bump min cxx standard to 17 (#6742)""
Browse files Browse the repository at this point in the history
This reverts commit 90167cf.
  • Loading branch information
oandreeva-nv committed Jan 12, 2024
1 parent 90167cf commit 836d662
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ project(tritonserver LANGUAGES C CXX)

include(CMakeDependentOption)

# Use C++17 standard as Triton's minimum required.
set(TRITON_MIN_CXX_STANDARD 17 CACHE STRING "The minimum C++ standard which features are requested to build this target.")

set(TRITON_VERSION "0.0.0" CACHE STRING "The version of the Triton shared library" )

option(TRITON_ENABLE_LOGGING "Include logging support in server" ON)
Expand Down Expand Up @@ -260,6 +263,7 @@ ExternalProject_Add(triton-server
-DTRITON_ENABLE_S3:BOOL=${TRITON_ENABLE_S3}
-DTRITON_ENABLE_TENSORRT:BOOL=${TRITON_ENABLE_TENSORRT}
-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
12 changes: 6 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if (NOT WIN32)
set_property(TARGET main PROPERTY OUTPUT_NAME tritonserver)
endif()

target_compile_features(main PRIVATE cxx_std_11)
target_compile_features(main 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 Expand Up @@ -353,7 +353,7 @@ if(${TRITON_ENABLE_HTTP}
${HTTP_ENDPOINT_SRCS} ${HTTP_ENDPOINT_HDRS}
)

target_compile_features(http-endpoint-library PRIVATE cxx_std_11)
target_compile_features(http-endpoint-library PRIVATE cxx_std_${TRITON_MIN_CXX_STANDARD})
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(
http-endpoint-library
Expand Down Expand Up @@ -508,7 +508,7 @@ if(${TRITON_ENABLE_TRACING})
)

if (NOT WIN32)
target_compile_features(tracing-library PRIVATE cxx_std_17)
target_compile_features(tracing-library PRIVATE cxx_std_${TRITON_MIN_CXX_STANDARD})

target_include_directories(
tracing-library
Expand Down Expand Up @@ -592,7 +592,7 @@ if (NOT WIN32)
simple.cc
)

target_compile_features(simple PRIVATE cxx_std_11)
target_compile_features(simple 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 Expand Up @@ -656,7 +656,7 @@ if (NOT WIN32)
multi_server.cc
)

target_compile_features(multi_server PRIVATE cxx_std_11)
target_compile_features(multi_server 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 Expand Up @@ -721,7 +721,7 @@ if (NOT WIN32)
memory_alloc.cc
)

target_compile_features(memory_alloc PRIVATE cxx_std_11)
target_compile_features(memory_alloc 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
2 changes: 1 addition & 1 deletion src/grpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ add_library(
stream_infer_handler.cc
)

target_compile_features(grpc-endpoint-library PRIVATE cxx_std_11)
target_compile_features(grpc-endpoint-library PRIVATE cxx_std_${TRITON_MIN_CXX_STANDARD})
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(
grpc-endpoint-library
Expand Down

0 comments on commit 836d662

Please sign in to comment.