Everything in the VS project file is relative to the project file itself.
The project file gets put in the target.subdir, so to include files from
there we just need to use '.'. To include from the private dir, we
need to use the relative path from the target dir to the target private
dir.
1. Dependencies must be set up with the target's id instead of its
basename.
2. Extracted object output file names must not include the directory
prefix, because MSBuild puts all object files into the same directory
and names them srcfilename.obj instead of dir/filename.obj or
dir_filename.obj.
The 'Rebuild' target fails in mysterious ways if multiple targets use
the same directories because of output files being deleted between two
build steps (e.g. test case 78 fails on Rebuild, whereas Clean + Build
work just fine).
This creates the PrecompiledHeader properties for every source file in the
project if multiple languages are present. Otherwise, the global pch
settings are used.
The pch to use is determined by checking the suffix of the source file.
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.