TwineCompile with MSbuild, but not with IDE

TwineCompile - Cut C++Builder compile times by up to 50x!
zzattack
Posts: 22
Joined: Tue Feb 02, 2021 3:35 am

Re: TwineCompile with MSbuild, but not with IDE

Post by zzattack »

Awesome, thanks. Which property does -prog- map to? Far as I can tell this is undocumented still. If not, where should I be looking?
jomitech
Site Admin
Posts: 2153
Joined: Wed Oct 08, 2008 12:23 am

Re: TwineCompile with MSbuild, but not with IDE

Post by jomitech »

It's not published as an MSBuild property out of the box, so you need to make some tweaks to make it available. The easiest way is to modify TCTargets104.targets to add it directly to the TCCompileFileList task.

For example:
<TCCompileFileList
Condition="('$(FileToCompile)'=='' Or '$(TCChildBuild)'!='true') And '$(TC_HasFiles)'=='True'"
Threads="$(TC_Threads)"
DisableCaching="$(TC_DisableCaching)"
InjectHeader="$(BCC_PCHInject)"
AllocateFiles="$(TC_AllocateFiles2)"
StopOnErrors="$(TC_StopOnErrors)"
FileAliases="$(TC_FileAliases)"
Make="$(TC_Make)"
Priority="$(TC_Priority)"
Affinity="$(TC_Affinity)"
MaxCache="$(TC_MaxCache)"
PermanentCache="$(TC_PCache)"
ProjectDirectory="$(MSBuildProjectDirectory)"
UseClang="$(USING_CLANG)"
DisableProgress="$(TC_DisableProgress)"
/>

And then you can invoke the compile and set the TC_DisableProgress property to true or false.
Jon
zzattack
Posts: 22
Joined: Tue Feb 02, 2021 3:35 am

Re: TwineCompile with MSbuild, but not with IDE

Post by zzattack »

Excellent, thank you, works perfectly. I noticed multiple TCCompileFileList entries in this XML, simply adding the DisableProgress attribute to each did the trick.
I hope this will become available by default in the Targets file, as I can see myself overwriting this file with new installers without realizing it.
zzattack
Posts: 22
Joined: Tue Feb 02, 2021 3:35 am

Re: TwineCompile with MSbuild, but not with IDE

Post by zzattack »

This no longer appears to work with the TcTargets110.targets file. Do we have to change something?
jomitech
Site Admin
Posts: 2153
Joined: Wed Oct 08, 2008 12:23 am

Re: TwineCompile with MSbuild, but not with IDE

Post by jomitech »

Unfortunately, we removed the -prog- flag from the MSBuild action because we thought it was not being used any longer. We'll add it back in the next release and make it part of the targets files as well.
Jon
Post Reply