Windows -T v100 argument causing VS2015 to fail trycompile.
I've got a project that I'm trying to compile in 2015 using -T v100 to target the older runtime. I'm seeing an issue similar to #15986 (closed) where the compiler fails to compile a simple test program.
I was able to fix the issue with this simple patch:
diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS14LinkFlagTable.h
index 6e56422..077ad75 100644
--- a/Source/cmVS14LinkFlagTable.h
+++ b/Source/cmVS14LinkFlagTable.h
@@ -140,7 +140,7 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] = {
{ "ManifestEmbed", "manifest:embed", "", "true", 0 },
{ "GenerateDebugInformation", "DEBUG:FASTLINK", "", "DebugFastLink",
cmVS7FlagTable::CaseInsensitive },
- { "GenerateDebugInformation", "DEBUG", "", "Debug",
+ { "GenerateDebugInformation", "DEBUG", "", "true",
cmVS7FlagTable::CaseInsensitive },
{ "MapExports", "MAPINFO:EXPORTS", "", "true", 0 },
{ "AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0 },
What's odd is that it only fails with the -T v100 argument. Logic would dictate that it fail all the time since this is common code to VS2015. In any event, with this change in place the configure seems to work both with and without the -T argument.
Unfortunately this still leaves me with a mystery. If I configure normally (without the -T) for VS2015 I can then manually set a projects PlatformToolset to v100 and everything seems fine. The project looks normal. If, however, I use -T v100 and then load the solution, all the projects come up with (Visual Studio 2010) annotations and VS2015 prompts me to convert them.
I haven't been able to figure out how to make cmake generate something equivalent to what happens when I manually configure through Visual Studio.