다음을 통해 공유


다중 프로세서 빌드

업데이트: 2007년 11월

다중 프로세서 빌드를 사용하여 CPU가 두 개 이상인 컴퓨터에서 여러 프로젝트를 동시에 빌드할 수 있습니다. 예를 들어, 컴퓨터에 CPU가 둘인 경우 이 기능을 사용하면 최대 두 개의 프로젝트를 동시에 빌드할 수 있습니다.

Visual Studio는 빌드 프로세스를 최적화하기 위해 최대 동시 빌드 수를 컴퓨터의 CPU 수와 같게 자동으로 설정합니다. 옵션 대화 상자의 빌드 및 실행 속성 페이지에서 최대 병렬 프로젝트 빌드 수 속성의 값을 변경하여 이 설정을 수정할 수 있습니다. 자세한 내용은 방법: 다중 프로세서 빌드의 동시 빌드 수 설정을 참조하십시오.

다중 프로세서 빌드 실행

IDE 또는 명령줄에서 다중 프로세서 빌드를 실행할 수 있습니다. 명령줄에서 빌드하려면 VCBUILD 또는 DEVENV를 사용합니다. 이러한 개념을 보여 주는 작업을 보려면 다음을 참조하십시오.

다중 프로세서 빌드 출력

다중 프로세서 빌드를 실행하면 프로젝트 시스템은 빌드에 포함된 각 프로젝트 구성에 숫자와 오른쪽 대괄호를 할당합니다. 모든 빌드 단계의 각 상태 메시지 앞에 이 프롬프트가 표시됩니다.

다음 예제 빌드 출력은 다중 프로세서 빌드의 결과입니다.

1>------ Build started: Project: ConsoleApp2, Configuration: Debug Win32 ------
2>------ Build started: Project: ConsoleApp1, Configuration: Debug Win32 ------
1>Compiling...
2>Compiling...
1>stdafx.cpp
2>stdafx.cpp
2>Compiling...
1>Compiling...
2>AssemblyInfo.cpp
1>AssemblyInfo.cpp
1>ConsoleApp2.cpp
2>ConsoleApp1.cpp
2>Generating Code...
1>Generating Code...
1>Compiling resources...
2>Compiling resources...
2>Linking...
1>Linking...
2>Build log was saved at "file://d:\Documents and Settings\username\My Documents\Visual Studio\Projects\Demo\ConsoleApp1\Debug\BuildLog.htm"
2>ConsoleApp1 - 0 error(s), 0 warning(s)
2>
1>Build log was saved at "file://d:\Documents and Settings\username\My Documents\Visual Studio\Projects\Demo\ConsoleApp2\Debug\BuildLog.htm"
1>ConsoleApp2 - 0 error(s), 0 warning(s)
1>
---------------------- Done ----------------------

    Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped

다중 프로세서 빌드 출력은 여러 프로젝트에 대한 빌드 단계가 동시에 발생할 수 있음을 보여 줍니다. 이 동작은 현재 프로젝트의 빌드 프로세스가 완료될 때까지는 다른 프로젝트의 빌드 프로세스를 시작하지 않는 단일 프로세서 빌드와 대조적입니다.

다음 예제 빌드 출력은 단일 프로세서 빌드의 결과입니다.

------ Build started: Project: ConsoleApp1, Configuration: Debug Win32 ------
Compiling...
stdafx.cpp
Compiling...
AssemblyInfo.cpp
ConsoleApp1.cpp
Generating Code...
Compiling resources...
Linking...
Build log was saved at "file://d:\Documents and Settings\username\My Documents\Visual Studio\Projects\Demo\ConsoleApp1\Debug\BuildLog.htm"
ConsoleApp1 - 0 error(s), 0 warning(s)

------ Build started: Project: ConsoleApp2, Configuration: Debug Win32 ------
Compiling...
stdafx.cpp
Compiling...
AssemblyInfo.cpp
ConsoleApp2.cpp
Generating Code...
Compiling resources...
Linking...
Build log was saved at "file://d:\Documents and Settings\username\My Documents\Visual Studio\Projects\Demo\ConsoleApp2\Debug\BuildLog.htm"
ConsoleApp2 - 0 error(s), 0 warning(s)

---------------------- Done ----------------------

    Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped

참고 항목

참조

빌드 시간 단축 방법