How to use an external build system for a Visual C ++ 2013 project?

Can I use external build systemfor VC ++ 2013? I want Visual Studio to do nothing but build, invoking my build tools.

I am thinking of something like this:

  • Put the entire build command in packages.
  • Call the assembly package at the project level by right-clicking the project and selecting the assembly.
  • Call the solution-level assembly package by right-clicking on the solution and selecting the assembly.

    Is there any pass-through tutorial? I searched a lot, but no luck.

ADD 1 - Some progress ...

After a brief introduction to the process, MSBuildI tried as shown below.

First I edit the project file *.vcxproj. I am changing DefaultTargetsfrom Buildto MyTarget.

<Project DefaultTargets="MyTarget" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

MyTarget:

  <Target Name="MyTarget">
    <Message Text="Hello, Bitch!" />
  </Target>

, VS2013 .

:

enter image description here

Visual Studio, Build, .

? , Visual Studio, .

ADD 2

, , *.c ClCompile, .

<ItemGroup>
   <ClCompile Include="z:\MyProject1\source1.c" />
<ItemGroup>

, VS2013 , <ClInclude>, , ... , .

ADD 3

.

Visual Studio ++ .

, . , build/rebuild/clean.

+3
2

, Makefile Visual Studio ( Visual ++/General).

, (clean, build, rebuild). make, . . , VS ( ), , (debug vs. release).

+2

( , .. V++. .)

, !

- target overriding. Visual Studio Build\Rebuild\Clean MSBuild Build\Rebuild\Clean, . *.vcxproj.

:

enter image description here

, :

, MSBuild, - , - *.vcxproj.

override.proj , , :

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Target Name="Build">
    <Message Text="Build override!" />
    <Exec Command="kickass.bat" />
  </Target>
</Project>

:

, :

  • CSharp , ALSO V++.

  • V++, . Microsoft.Cpp.targets, :

enter image description here

ADD 1

, overrride.proj. *.vcxprj. , :

enter image description here

ADD 2

target overriding, , bat project's Build/Rebuild/Clean. , solution's Build/Rebuild/Clean, , - project dependency order , , overall build .

- dummy project overall.

0

Source: https://habr.com/ru/post/1609020/


All Articles