Repository navigation
Document VCPKG_CMAKE_GENERATOR and FASTBuild acquisition - #624
Daniel Johansson (djohansson) wants to merge 2 commits into
Conversation
microsoft/vcpkg#54969 adds the VCPKG_CMAKE_GENERATOR triplet variable, which sets the generator vcpkg_cmake_configure uses for ports that don't pass GENERATOR or WINDOWS_USE_MSBUILD, and acquires FASTBuild for the FASTBuild generator as it does Ninja (vcpkg_find_acquire_program(FASTBUILD)). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Learn Build status updates of commit c4d0b17: âś… Validation status: passed
For more details, please refer to the build report. |
| For example, to build ports with [FASTBuild](https://fastbuild.org/): | ||
|
|
||
| ```cmake | ||
| set(VCPKG_CMAKE_GENERATOR FASTBuild) | ||
| ``` | ||
|
|
There was a problem hiding this comment.
This is not enough to actual make correct use of FASTBuild.
You probably need additionally:
-DCMAKE_FASTBUILD_CACHE_PATH=
-DCMAKE_FASTBUILD_USE_RELATIVE_PATHS=ON
You probably also want to pass:
"-verbose" "-summary" "-cache" as build params to obtain statistic about the caching mechanism.
It has been some time since i did microsoft/vcpkg#49215 but I saw little to no benefit in using it.
There was a problem hiding this comment.
I have been using it for some time now. With distributed compilation and cache enabled it gives real improvements in heavier workloads (such as compiling llvm for example).
Will add the additional required flags to the docs.
There was a problem hiding this comment.
Added the cache path and mode, with the passthrough Windows needs, plus deterministic paths. I left out relative paths since FASTBuild documents UseRelativePaths_Experimental as incomplete and not to be used.
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. âś… No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
The FASTBuild generator alone builds without FASTBuild's cache, which takes a cache directory (FASTBUILD_CACHE_PATH or CMAKE_FASTBUILD_CACHE_PATH) and FASTBUILD_CACHE_MODE to turn it on, passed through vcpkg's clean environment on Windows (VCPKG_ENV_PASSTHROUGH_UNTRACKED). Also CMAKE_FASTBUILD_USE_DETERMINISTIC_PATHS, which keeps compiler outputs deterministic. Not CMAKE_FASTBUILD_USE_RELATIVE_PATHS: FASTBuild documents UseRelativePaths_Experimental as incomplete, not to be used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Learn Build status updates of commit 7bfe543: âś… Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. âś… No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
Documents microsoft/vcpkg#54969, as requested there.
triplets.md: the newVCPKG_CMAKE_GENERATORtriplet variable. It sets the generatorvcpkg_cmake_configureuses for ports that don't choose one. A port'sGENERATORorWINDOWS_USE_MSBUILDtakes precedence.vcpkg_cmake_configure.md:GENERATORnow gives the order (WINDOWS_USE_MSBUILD, thenGENERATOR, thenVCPKG_CMAKE_GENERATOR, then Ninja or Unix Makefiles) and says that vcpkg downloads FASTBuild, as it does Ninja.vcpkg_find_acquire_program.md:FASTBUILDadded to the list of programs.The version given, 2026-11-09, is the
vcpkg-cmakeversion in that PR, so this should merge after it.triplets.mdalso says what FASTBuild's cache needs beside the generator: a cache directory (FASTBUILD_CACHE_PATHorCMAKE_FASTBUILD_CACHE_PATH),FASTBUILD_CACHE_MODEto turn it on, passed through vcpkg's clean environment on Windows (VCPKG_ENV_PASSTHROUGH_UNTRACKED), andCMAKE_FASTBUILD_USE_DETERMINISTIC_PATHS(review feedback). NotCMAKE_FASTBUILD_USE_RELATIVE_PATHS: FASTBuild's documentation callsUseRelativePaths_Experimentalincomplete and says not to use it.vcpkg_cmake_configure.mdandtriplets.mdcarryai-usage: ai-assisted: the changes are about 11% and 9% of the articles. The change tovcpkg_find_acquire_program.mdis under 5%, below the threshold for the tag.🤖 Generated with Claude Code