diff options
author | Katelyn Gadd <kg@luminance.org> | 2018-09-12 20:58:34 +0300 |
---|---|---|
committer | Ludovic Henry <luhenry@microsoft.com> | 2018-09-12 20:58:34 +0300 |
commit | 2abb347ffa8d81029e89f662978a4467649e9e70 (patch) | |
tree | 21604508fc29f2f50845069983e416feeea7923d /msvc | |
parent | c5ffbed4a9d9292db9a562f39905e32999730dcd (diff) |
Fix forceBuild not working for projects with unknown platform names (i.e. jay) (#10485)
* Fix forceBuild not working for projects with unknown platform names (i.e. jay)
* Clean up error messages
Diffstat (limited to 'msvc')
-rwxr-xr-x | msvc/scripts/genproj.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs index 12e3bb139d5..b4267636971 100755 --- a/msvc/scripts/genproj.cs +++ b/msvc/scripts/genproj.cs @@ -139,13 +139,14 @@ public class SlnGenerator { private void WriteProjectConfigurationPlatforms (StreamWriter sln, string guid, string defaultPlatform, bool forceBuild) { var fallbackProfileNames = new List<string> (); + var didBuildAnyProfile = false; foreach (var profile in profiles) { - if (!observedProfiles.Contains (profile)) + if (!observedProfiles.Contains (profile) && !forceBuild) continue; var platformToBuild = profile; - var isBuildEnabled = true; + var isBuildEnabled = true; HashSet<string> projectProfiles; if ( @@ -157,6 +158,9 @@ public class SlnGenerator { isBuildEnabled = forceBuild; } + if (isBuildEnabled) + didBuildAnyProfile = true; + sln.WriteLine ("\t\t{0}.Debug|{1}.ActiveCfg = Debug|{2}", guid, profile, platformToBuild); if (isBuildEnabled) sln.WriteLine ("\t\t{0}.Debug|{1}.Build.0 = Debug|{2}", guid, profile, platformToBuild); @@ -165,6 +169,9 @@ public class SlnGenerator { sln.WriteLine ("\t\t{0}.Release|{1}.Build.0 = Release|{2}", guid, profile, platformToBuild); } + if (!didBuildAnyProfile) + Console.Error.WriteLine($"// Project {guid} not set to build in any profile"); + if (fallbackProfileNames.Count > 0) Console.Error.WriteLine ($"// Project {guid} does not have profile(s) {string.Join(", ", fallbackProfileNames)} so using {defaultPlatform}"); } |