How to skip conversion of /permissive into <ConformanceMode>

Hi,

C++20 in MSVC enables standard conformance. I would like to disable it for now. CMake properly converts /permissive flag into false in .vcxproj. And MSBuild adds /permissive flag to compilation. The problem is that order of /permissive and /std:c++20 affects the result.

Is there any way to not convert flag into ConformanceMode and just add it to end of AdditionalOptions? I’ve tried target_compile_options and add_compile_options without any success.

I’ve created props file and adding it through VS_USER_PROPS. Are there any better ways?

if(MSVC_VERSION EQUAL 1929)
      set_target_properties(${ARG_TARGET} PROPERTIES VS_USER_PROPS ${CMAKE_BINARY_DIR}/vs2019_permissive_workaround.props)
endif()
<?xml version="1.0" encoding="utf-8"?>
<Project>
  <ImportGroup Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>
  <ItemDefinitionGroup>
    <ClCompile>
      <AdditionalOptions>%(AdditionalOptions) /permissive</AdditionalOptions>
    </ClCompile>
  </ItemDefinitionGroup>
</Project>