BuildXL/Examples/CMakeNinjaHelloWorld
Marcelo Lynch 🧉 3b54737b0b Merged PR 770069: Disable InBoxSdkSourceResolver for Ninja builds
The inbox sdk source resolver fails for Ninja builds. Disable it explicitly in this case, to not require this configuration explicitly in the resolver settings.

Related work items: #2154307
2024-03-18 23:09:16 +00:00
..
CMakeLists.txt Merged PR 770093: Add minimal documentation for the CMake/Ninja front-end and update examples 2024-03-06 21:04:27 +00:00
README.md Merged PR 770093: Add minimal documentation for the CMake/Ninja front-end and update examples 2024-03-06 21:04:27 +00:00
build.bat Merged PR 770093: Add minimal documentation for the CMake/Ninja front-end and update examples 2024-03-06 21:04:27 +00:00
build.ps1 Merged PR 770093: Add minimal documentation for the CMake/Ninja front-end and update examples 2024-03-06 21:04:27 +00:00
config.dsc Merged PR 770069: Disable InBoxSdkSourceResolver for Ninja builds 2024-03-18 23:09:16 +00:00
main.cc Merged PR 770093: Add minimal documentation for the CMake/Ninja front-end and update examples 2024-03-06 21:04:27 +00:00

README.md

Instructions

  1. Set the environment variable BUILDXL_BIN to the BuildXL binary folder containing bxl.exe. For example, if your BuildXL repo is in D:\BuildXL, then building BuildXL itself using bxl.cmd -Minimal will put the bxl.exe in D:\BuildXL\Out\Bin\debug\win-x64.
  2. Point the environment variable BUILDXL_BIN to the BuildXL binary folder path. For example, if you set up BuildXL in D:\BuildXL and built the repository, then D:\BuildXL\Out\Bin\debug\win-x64 should be the value.
  3. Run .\build.ps1 from PowerShell, or equivalently build.bat from the command line prompt. This will:
    1. Generate the build.ninja specification by running cmake -GNinja in this directory. The next step depends on the CMakeNinjaHelloWorld\build.ninja file existing as the output of this invocation.
    2. Run the build with BuildXL using the Ninja resolver
  4. Subsequent runs of this script should be fully cached. The Ninja-generation step (step 2) should be re-run if the CMake specifications change.

For further configuration options for the Ninja resolver, see Resolvers.