This makes the following changes:
* Explicitly closes the file for force flushing (this fixes an issue on which the last 2 or 3 lines weren't being written to disk)
* Adds another check on the PBXBuildFile stage to get the file name if the returned source type is a File instead of a string
Fixes issue #337
MSBuild automatically includes the output objects of the CustomBuildStep
in the link command. If the objects are additionally added to the project,
they will be put twice on the linker command, which leads to LNK4042
warning.
MSBuild does not allow multiple CustomBuildStep elements. Therefore, all
input / output files and generator commands must be concatenated and put
into a single CustomBuildStep.
Noticed when trying to pass custom optimization flags, and hence setting
buildtype to plain, that warnings for different levels were not passed to
compiler.
This was a bit confusing since mesonconf still displayed "warning_level=3"
and -Werror was passed correctly due to "werror=true". So this change
aligns warning_level behavior with werror. That is, heed what is in
project() in meson.build but user can still override if necessary.
This is very useful to prevent compiler noise about invalid cflags; particularly
for the -mms-bitfields cflag which most libraries send to the mingw-gcc
compiler. More can be added later.
Instead of checking if we're on Windows and not even trying, try to symlink and
if that fails due to insufficient privileges, then just continue. This allows
people who know what they're doing to allow users other than Administrators to
make symlinks on Windows, or allows them to just run Meson as an Administrator.