doc: clarify that the “-j N” goes after the “–build build” part #32846

pull bigspider wants to merge 1 commits into bitcoin:master from bigspider:patch-1 changing 8 files +20 −20
  1. bigspider commented at 7:22 am on July 1, 2025: contributor
    I was surprised that something like cmake -j 4 --build build doesn’t work, so this might help others to not make the same mistake.
  2. DrahtBot added the label Docs on Jul 1, 2025
  3. DrahtBot commented at 7:23 am on July 1, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32846.

    Reviews

    See the guideline for information on the review process.

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32269 (doc: update unix build doc with build flags by bufo24)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. maflcko commented at 7:30 am on July 1, 2025: member
    lgtm ACK 69f3b2039147558f5c9b452016ab980930e85222
  5. hebasto commented at 8:55 am on July 1, 2025: member

    Concept ACK. It follows CMake docs.

    Why not apply such a change across all the docs?

    See the output of git grep -i 'Use "-j N"' for relevant instances.

  6. stickies-v commented at 9:06 am on July 1, 2025: contributor

    Concept ACK

    See the output of git grep -i ‘Use “-j N”’ for relevant instances.

    Agreed with this. I also couldn’t find any other patterns that should be updated here.

  7. doc: clarify that the "-j N" goes after the "--build build" part
    Also, capitalized the comments in build-unix.md for uniformity
    with the docs on other targets.
    0e9f409db3
  8. bigspider force-pushed on Jul 1, 2025
  9. bigspider commented at 10:04 am on July 1, 2025: contributor

    Done, and rebased.

    I also noticed that the analogous comments were capitalized in all other build-*.md files, so I capitalized them in build-unix.md as well.

  10. hebasto approved
  11. hebasto commented at 10:17 am on July 1, 2025: member
    ACK 0e9f409db3b7b08aef75ce39765b018b69cc8e9d.
  12. DrahtBot requested review from maflcko on Jul 1, 2025
  13. DrahtBot requested review from stickies-v on Jul 1, 2025
  14. in doc/build-windows.md:50 in 0e9f409db3
    46@@ -47,9 +47,9 @@ This means you cannot use a directory that is located directly on the host Windo
    47 
    48 Build using:
    49 
    50-    gmake -C depends HOST=x86_64-w64-mingw32  # Use "-j N" for N parallel jobs.
    51+    gmake -C depends HOST=x86_64-w64-mingw32  # Append "-j N" for N parallel jobs.
    


    stickies-v commented at 10:43 am on July 1, 2025:
    review note: gmake seems fine with placing -j earlier, so technically this change isn’t necessary, but it’s probably better to be consistent anyway.

    bigspider commented at 10:48 am on July 1, 2025:
    Good point. Same for ctest, I think.

    stickies-v commented at 11:04 am on July 1, 2025:
    Oh you’re right!
  15. stickies-v approved
  16. stickies-v commented at 10:44 am on July 1, 2025: contributor
    ACK 0e9f409db3b7b08aef75ce39765b018b69cc8e9d
  17. in doc/build-unix.md:13 in 0e9f409db3
     8@@ -9,8 +9,8 @@ To Build
     9 
    10 ```bash
    11 cmake -B build
    12-cmake --build build    # use "-j N" for N parallel jobs
    13-cmake --install build  # optional
    14+cmake --build build    # Append "-j N" for N parallel jobs
    15+cmake --install build  # Optional
    


    purpleKarrot commented at 11:12 am on July 1, 2025:
    cmake --install supports -j too!
  18. purpleKarrot commented at 11:23 am on July 1, 2025: contributor

    This may be unrelated, but cmake also respects some environment variables. So instead of passing -j to each command, you could just set CMAKE_BUILD_PARALLEL_LEVEL in bashrc or whatever your favorite shell uses. In fish, I use the following:

     0function cmake
     1  set -x CMAKE_C_COMPILER_LAUNCHER (which ccache)
     2  set -x CMAKE_CXX_COMPILER_LAUNCHER (which ccache)
     3  set -x CMAKE_BUILD_PARALLEL_LEVEL (nproc)
     4  set -x CMAKE_COLOR_DIAGNOSTICS 1
     5  set -x CMAKE_EXPORT_COMPILE_COMMANDS 1
     6  set -x CMAKE_GENERATOR Ninja
     7  set -x CMAKE_INSTALL_PREFIX $HOME/.local
     8  set -x CMAKE_POLICY_VERSION_MINIMUM 3.5
     9  command cmake $argv
    10end
    
  19. pablomartin4btc commented at 3:40 pm on July 1, 2025: member
    ACK 0e9f409db3b7b08aef75ce39765b018b69cc8e9d
  20. theStack approved
  21. theStack commented at 4:29 pm on July 1, 2025: contributor

    ACK 0e9f409db3b7b08aef75ce39765b018b69cc8e9d

    Makes sense to clarify, have tripped over this as well in the past.

  22. brunoerg approved
  23. brunoerg commented at 5:11 pm on July 1, 2025: contributor
    ACK 0e9f409db3b7b08aef75ce39765b018b69cc8e9d
  24. achow101 commented at 6:56 pm on July 1, 2025: member
    ACK 0e9f409db3b7b08aef75ce39765b018b69cc8e9d
  25. achow101 merged this on Jul 1, 2025
  26. achow101 closed this on Jul 1, 2025

  27. bigspider deleted the branch on Jul 1, 2025
  28. fanquake referenced this in commit 83ee49b1dc on Jul 3, 2025
  29. fanquake commented at 4:44 pm on July 3, 2025: member
    Backported to 29.x in #32863.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-07-06 09:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me