CSharp: CMake 3.12.3 incorrectly creates a *.csproj file from a add_custom_target command
Hi,
I just tried CMake 3.13-rc2 as 2 other bugs I reported have been fixed there: #18486 (closed) and #18485 (closed). Both these bugs have been fixed! Now however I am facing a new one: In my project I have a couple of custom_targets that create code. One of these targets creates a *.cs file. In the new CMake release this results in the target being created as a *.csproj for Visual Studio now which cannot be compiled. In 3.10.2 (the last one I could check because of #18485 (closed)) this used to be a *.vcxproj with the custom build step doing what I was expecting. If the generated file is stated as a *.cpp file I get a *.vcxproj file again. When applying the
set_source_files_properties(${CODE_GENERATOR_OUTPUT} PROPERTIES LANGUAGE CXX)
to the group of *.cs files this restored the old behaviour, but this seems like a hack.
Is this by design? An example to reproduce the issue can be found attached.CMakeBug.zip
Regards,
Stefan