TwineCompile and msbuild: .proj/.targets instead of .cbproj?
Posted: Thu Jun 10, 2021 4:29 am
Hi,
The documentation for using TwineCompile with msbuild describes Import-ing the TwineCompile target file in a specific location in the .cbproj file (after the CodeGear.Cpp.Targets line).
This works well as described - the multi-threaded compiler in invoked for all .cbproj files that have this addition.
However, in a setting such as ours with our total build made up of a number of .cbproj files, it seems a little cumbersome to inject this Import into each and every file.
We already use .targets files to reuse build config, along with the higher level msbuild .proj files. Is it at all possible to activate TwineCompile using an Import statement for the TwineCompile .target in our own "myApp.targets" file, include that at the top in the "app.proj" file and have the magic happen for all builds covered by that .proj? I have not had any success with my initial attempts at this, so my assumption is that the location of the import matters in order for the Twine targets to be applied in the individual .cbproj builds.
Grateful for any input or suggestions on this. I would like to be able to "sneak in" TwineCompile support using a conditional Import without touching every .cbproj (including future ones).
The documentation for using TwineCompile with msbuild describes Import-ing the TwineCompile target file in a specific location in the .cbproj file (after the CodeGear.Cpp.Targets line).
This works well as described - the multi-threaded compiler in invoked for all .cbproj files that have this addition.
However, in a setting such as ours with our total build made up of a number of .cbproj files, it seems a little cumbersome to inject this Import into each and every file.
We already use .targets files to reuse build config, along with the higher level msbuild .proj files. Is it at all possible to activate TwineCompile using an Import statement for the TwineCompile .target in our own "myApp.targets" file, include that at the top in the "app.proj" file and have the magic happen for all builds covered by that .proj? I have not had any success with my initial attempts at this, so my assumption is that the location of the import matters in order for the Twine targets to be applied in the individual .cbproj builds.
Grateful for any input or suggestions on this. I would like to be able to "sneak in" TwineCompile support using a conditional Import without touching every .cbproj (including future ones).