doc: Improve cmake instructions in README #1641

pull fjahr wants to merge 1 commits into bitcoin-core:master from fjahr:cmake-readme changing 1 files +6 −7
  1. fjahr commented at 9:45 pm on November 26, 2024: none

    Minor improvement suggestion for the readme. I find this alternative way of using cmake a bit more comfortable because I don’t like to change the directory.

    It’s just a suggestion based on personal preference, if this is too minor of an improvement feel free to close.

  2. doc: Improve cmake instructions in README b339fe45ab
  3. fjahr force-pushed on Nov 26, 2024
  4. real-or-random added the label user-documentation on Nov 27, 2024
  5. real-or-random added the label build on Nov 27, 2024
  6. real-or-random commented at 8:13 am on November 27, 2024: contributor

    I happen to find this a tiny bit more comfortable, too, but IIRC we had discussed this (I can’t find the discussion) and @hebasto argued that the tutorial cds into the build directory. I also think that mkdir build && cd build is a bit more self-documentary to people not familiar with CMake because it makes clear that build is a directory and not some CMake command or something.

    No strong opinion from my side, but I think there are good reasons for what we have currently.

  7. fjahr commented at 0:32 am on November 28, 2024: none
    @real-or-random alright, thanks for the info, closing it for now
  8. fjahr closed this on Nov 28, 2024

  9. hebasto commented at 1:14 pm on November 28, 2024: member
    FWIW, while working on the CMake staging branch for Bitcoin Core, the rough consensus has been reached not to suggest using cd in the build docs (see https://github.com/bitcoin/bitcoin/blob/master/doc/build-*.md).
  10. fjahr commented at 2:40 pm on December 3, 2024: none
    Ok, reopening since @real-or-random seemed in favor and I take from @hebasto ’s comment that the argument for cd-ing seems not so relevant anymore and this would align the instructions here with bitcoin core.
  11. fjahr reopened this on Dec 3, 2024

  12. in README.md:87 in b339fe45ab
    87+    $ cmake -B build
    88+    $ cmake --build build
    89+    $ ctest --test-dir build  # run the test suite
    90+    $ sudo cmake --install build  # optional
    91 
    92 To compile optional modules (such as Schnorr signatures), you need to run `cmake` with additional flags (such as `-DSECP256K1_ENABLE_MODULE_SCHNORRSIG=ON`). Run `cmake .. -LH` to see the full list of available flags.
    


    hebasto commented at 3:06 pm on December 3, 2024:

    This has to be adjusted accordingly:

    0To compile optional modules (such as Schnorr signatures), you need to run `cmake` with additional flags (such as `-DSECP256K1_ENABLE_MODULE_SCHNORRSIG=ON`). Run `cmake -B build -LH` to see the full list of available flags.
    

    Or even:

    0To compile optional modules (such as Schnorr signatures), you need to run `cmake` with additional flags (such as `-DSECP256K1_ENABLE_MODULE_SCHNORRSIG=ON`). Run `cmake -B build -LH` or `ccmake -B build` to see the full list of available flags.
    
  13. in README.md:94 in b339fe45ab
    90@@ -92,11 +91,11 @@ To compile optional modules (such as Schnorr signatures), you need to run `cmake
    91 To alleviate issues with cross compiling, preconfigured toolchain files are available in the `cmake` directory.
    92 For example, to cross compile for Windows:
    93 
    94-    $ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-w64-mingw32.toolchain.cmake
    95+    $ cmake --build build -DCMAKE_TOOLCHAIN_FILE=../cmake/x86_64-w64-mingw32.toolchain.cmake
    


    hebasto commented at 3:06 pm on December 3, 2024:
    0    $ cmake --build build -DCMAKE_TOOLCHAIN_FILE=cmake/x86_64-w64-mingw32.toolchain.cmake
    

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-03 20:15 UTC

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