Missing CompileAs option on vcxproj generated by cmake 3.18.1

When I generate the .vcxproj for my project with cmake 3.2.1, it generates the line <CompileAs>CompileAsCpp</CompileAs> But when I try the cmake version 3.18.1, the generated .vcxproj file does not contain that previous line causing my tests to fail (the code compiles). Here the cmake code which set the project properties :

add_library(${PROJECT_NAME} SHARED ${PROJECT_SRC})

if(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake|MSBuild)")
    target_compile_options(${PROJECT_NAME} PRIVATE "/TP")
endif()

target_include_directories(${PROJECT_NAME} PRIVATE ${PUBLIC_INCLUDES} ${PRIVATE_INCLUDES} )
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_target_properties(${PROJECT_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_target_properties(${PROJECT_NAME} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
set_target_properties(${PROJECT_NAME} PROPERTIES PDB_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

How can I ask to cmake to generate that missing line ( <CompileAs>CompileAsCpp</CompileAs> )? Thank you.

I tried to use CMake 3.18.0 and it worked. The CompileAs tag was generated so I will use this version instead of the CMake 3.18.1

Thank you.

Sounds like that is a regression. Could you please report this in the CMake issue tracker?

https://gitlab.kitware.com/cmake/cmake/-/issues