How to control batch build order -> Build All

I have C ++ - a solution with 4 projects and 24 configurations. Projects cryptest, cryptlib, cryptdlland dlltest. And then there is a partial cross product of x86, x64, debug, release, DLL export and DLL import.

There is a not so obvious dependency that I cannot express in the user interface or by manually editing project files. Addiction is everything . DLL related projects are dependent on . cryptest, Release Win32

Visual Studio allows us to create all configurations by choosing the Build menu and then Batch Build ... → Select All → Build . When I run Build All , the first configuration built is:

------ Build started: Project: cryptlib, Configuration: DLL-Import Debug x64 ------
Performing Custom Build Step
 Assembling: c:\Documents and Settings\cryptopp-5.6.3\x64masm.asm
Performing Custom Build Step
Compiling...
pch.cpp
...

As seen above, the mechanism chooses as its first choice. I want the following order: cryptlib, DLL-Import Debug x64

  • cryptlib, Release Win32
  • cryptest, Release Win32
  • Do not worry about the remaining 22 ....

The problem is that I cannot tell Visual Studio that all Win32 and x64 DLL projects are Win32 dependent cryptest.

How can I control the order of Batch Build -> Build All ?


Currently, I have to run Build All twice . The first ends:

========== Build: 20 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========

The second launch ends with:

========== Build: 4 succeeded, 0 failed, 20 up-to-date, 0 skipped ==========

GlobalSection(ProjectConfigurationPlatforms) ( , ), , . 24 Build All Visual Studio 2005, Build All (, ) Visual Studio 2008 .

( , ), , :

1>------ Skipped Build: Project: cryptlib ------
1> 
2>------ Skipped Build: Project: cryptest ------
2> 

- . , Visual Studio .


: Visual Studio < - → Startup . , , , .


, Visual Studio 2005 ( ), Visual Studio 2010 ( ).

, VS2010 . , , , VS2010 .

+3
1

x86 x64 cryptest cryptlib.

x86/x64 " " , .

... ...

Solution

Configuration Manager x86 x86 x64 x64.

, .

, x86 x64, x64 x86, .

Configuration manager

:

  • cryptlib32
  • cryptest32 cryptlib32
  • cryptlib64 cryptlib32 cryptest32
  • cryptest64 cryptlib64
  • cryptlib32/64 cryptest32/64

... ...

Project dependencies

.

, . ClassLibraries lib test , , final - ...

x86 lib test build, x64 lib test next, -...

------ Rebuild All started: Project: ClassLibraryLib32, Configuration: Debug x86 ------
  ClassLibraryLib32 -> C:\Users\Kory\Source\KoryG-Code\Solution1\ClassLibraryLib32\bin\x86\Debug\ClassLibraryLib.dll
------ Rebuild All started: Project: ClassLibraryLib32, Configuration: Release x86 ------
  ClassLibraryLib32 -> C:\Users\Kory\Source\KoryG-Code\Solution1\ClassLibraryLib32\bin\x86\Release\ClassLibraryLib.dll
------ Rebuild All started: Project: ClassLibraryTest32, Configuration: Release x86 ------
  ClassLibraryTest32 -> c:\users\kory\Source\KoryG-Code\Solution1\ClassLibraryTest32\bin\x86\Release\ClassLibraryTest.dll
------ Rebuild All started: Project: ClassLibraryTest32, Configuration: Debug x86 ------
  ClassLibraryTest32 -> c:\users\kory\Source\KoryG-Code\Solution1\ClassLibraryTest32\bin\x86\Debug\ClassLibraryTest.dll
------ Rebuild All started: Project: ClassLibraryLib64, Configuration: Debug x64 ------
  ClassLibraryLib64 -> C:\Users\Kory\Source\KoryG-Code\Solution1\ClassLibraryLib64\bin\x64\Debug\ClassLibraryLib.dll
------ Rebuild All started: Project: ClassLibraryLib64, Configuration: Release x64 ------
  ClassLibraryLib64 -> C:\Users\Kory\Source\KoryG-Code\Solution1\ClassLibraryLib64\bin\x64\Release\ClassLibraryLib.dll
------ Rebuild All started: Project: ClassLibraryTest64, Configuration: Release x64 ------
  ClassLibraryTest64 -> c:\users\kory\Source\KoryG-Code\Solution1\ClassLibraryTest64\bin\x64\Release\ClassLibraryTest.dll
------ Rebuild All started: Project: ClassLibraryTest64, Configuration: Debug x64 ------
  ClassLibraryTest64 -> c:\users\kory\Source\KoryG-Code\Solution1\ClassLibraryTest64\bin\x64\Debug\ClassLibraryTest.dll
------ Rebuild All started: Project: ClassLibraryFinal, Configuration: Release x86 ------
  ClassLibraryFinal -> c:\users\kory\Source\KoryG-Code\Solution1\ClassLibraryFinal\bin\x86\Release\ClassLibraryFinal.dll
------ Rebuild All started: Project: ClassLibraryFinal, Configuration: Release x64 ------
  ClassLibraryFinal -> c:\users\kory\Source\KoryG-Code\Solution1\ClassLibraryFinal\bin\x64\Release\ClassLibraryFinal.dll
------ Rebuild All started: Project: ClassLibraryFinal, Configuration: Debug x86 ------
  ClassLibraryFinal -> c:\users\kory\Source\KoryG-Code\Solution1\ClassLibraryFinal\bin\x86\Debug\ClassLibraryFinal.dll
------ Rebuild All started: Project: ClassLibraryFinal, Configuration: Debug x64 ------
  ClassLibraryFinal -> c:\users\kory\Source\KoryG-Code\Solution1\ClassLibraryFinal\bin\x64\Debug\ClassLibraryFinal.dll
========== Rebuild All: 12 succeeded, 0 failed, 0 skipped ==========
+2

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


All Articles