Compile PDB filename is different when using Ninja versus Visual Studio 2015
I noticed a different behavior concerning the compile pdb filename when using Ninja versus Visual Studio (2015) generators.
I did not set any COMPILE_PDB_XXX properties of my target.
When using VS2015 generator, the compile pdb filename for a library target "mylib" will be "mylib.pdb", but when using Ninja, it will be "vc140.pdb".
I tracked down this behavior difference to the facts that:
- Ninja generator will always issue a /Fd flag in the compile command passing a directory as argument, and thus the compiler creates a .pdb file named VCx0.pdb in the specified directory, where x is the major version of Visual C++ in use.
- MSVC generator cmVisualStudio10TargetGenerator.cxx:1784-1789 will not add any
<ProgramDataBaseFileName>tag, but in the project properties, Visual Studio sets the "Program Database File Name" to the default value of
$(IntDir)$(ProjectName).pdb, which will be passed as an argument for /Fd flag.
Would it be possible to make Ninja behave like MSVC generator?