diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index bee77c14b5b..46d60b2cf74 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -348,6 +348,8 @@ if( MSVC ) append("${flag}" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) endforeach(flag) + append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) + # Disable sized deallocation if the flag is supported. MSVC fails to compile # the operator new overload in User otherwise. check_c_compiler_flag("/WX /Zc:sizedDealloc-" SUPPORTS_SIZED_DEALLOC)