Return a list of MSBuild targets for external builders. The "Build" and "Clean" targets are always generated. If the spec contains 'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also be generated, to support building selected C/C++ files. Arguments:
(spec)
| 3818 | |
| 3819 | |
| 3820 | def _GetMSBuildExternalBuilderTargets(spec): |
| 3821 | """Return a list of MSBuild targets for external builders. |
| 3822 | |
| 3823 | The "Build" and "Clean" targets are always generated. If the spec contains |
| 3824 | 'msvs_external_builder_clcompile_cmd', then the "ClCompile" target will also |
| 3825 | be generated, to support building selected C/C++ files. |
| 3826 | |
| 3827 | Arguments: |
| 3828 | spec: The gyp target spec. |
| 3829 | Returns: |
| 3830 | List of MSBuild 'Target' specs. |
| 3831 | """ |
| 3832 | build_cmd = _BuildCommandLineForRuleRaw( |
| 3833 | spec, spec["msvs_external_builder_build_cmd"], False, False, False, False |
| 3834 | ) |
| 3835 | build_target = ["Target", {"Name": "Build"}] |
| 3836 | build_target.append(["Exec", {"Command": build_cmd}]) |
| 3837 | |
| 3838 | clean_cmd = _BuildCommandLineForRuleRaw( |
| 3839 | spec, spec["msvs_external_builder_clean_cmd"], False, False, False, False |
| 3840 | ) |
| 3841 | clean_target = ["Target", {"Name": "Clean"}] |
| 3842 | clean_target.append(["Exec", {"Command": clean_cmd}]) |
| 3843 | |
| 3844 | targets = [build_target, clean_target] |
| 3845 | |
| 3846 | if spec.get("msvs_external_builder_clcompile_cmd"): |
| 3847 | clcompile_cmd = _BuildCommandLineForRuleRaw( |
| 3848 | spec, |
| 3849 | spec["msvs_external_builder_clcompile_cmd"], |
| 3850 | False, |
| 3851 | False, |
| 3852 | False, |
| 3853 | False, |
| 3854 | ) |
| 3855 | clcompile_target = ["Target", {"Name": "ClCompile"}] |
| 3856 | clcompile_target.append(["Exec", {"Command": clcompile_cmd}]) |
| 3857 | targets.append(clcompile_target) |
| 3858 | |
| 3859 | return targets |
| 3860 | |
| 3861 | |
| 3862 | def _GetMSBuildExtensions(props_files_of_rules): |
no test coverage detected