backend(trtllm): use return value optimization flag as as error if available

This commit is contained in:
Morgan Funtowicz 2025-02-05 23:00:42 +01:00
parent 7f00c37905
commit 117d27849c

View File

@ -84,7 +84,7 @@ if (${TGI_TRTLLM_BACKEND_BUILD_TESTS} AND CMAKE_BUILD_TYPE MATCHES "Debug")
check_cxx_compiler_flag("-Wnrvo" COMPILER_SUPPORT_WARNING_ON_NVRO)
if (${COMPILER_SUPPORT_WARNING_ON_NVRO})
message(STATUS "Enabling non-NVRO detection")
target_compile_options(tgi_trtllm_backend_impl "-Wnvro")
target_compile_options(tgi_trtllm_backend_impl PRIVATE -Wnrvo)
endif ()
cmake_path(GET TRTLLM_NVRTC_WRAPPER_LIBRARY_PATH PARENT_PATH TRTLLM_NVRTC_WRAPPER_PARENT_LIBRARY_PATH)