diff --git a/thrift/lib/cpp/CMakeLists.txt b/thrift/lib/cpp/CMakeLists.txt index 9e183be1712..678ce38b41b 100644 --- a/thrift/lib/cpp/CMakeLists.txt +++ b/thrift/lib/cpp/CMakeLists.txt @@ -92,6 +92,16 @@ add_library( async/TUnframedAsyncChannel.cpp server/TServerObserver.cpp ) +if ( + CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR + CMAKE_CXX_COMPILER_ID STREQUAL "GNU" +) + target_compile_options( + async + PUBLIC + $<$:-fsized-deallocation> + ) +endif() target_link_libraries( async PUBLIC