delphimsbuildtarget

Skip projects in group if they don't have a platform


I have a Delphi 10.3 project group. All projects in it has the Win32 target platform, and only some of them has the Win64 target platform. When I build the group with MSBuild with /p:Platform=Win32, all projects have built. But if do the same with /p:Platform=Win64 key, all projects have also built even they don't configured with the Win64 target platform.

How can I avoid building the Win64 target for those projects, which don't have that target during building of the project group?


Solution

  • You can use Build Groups. Create one group and assign the Win32-enabled projects to it. Then create another group and assign the Win64-enabled projects to it. And then you can compile the groups individually.