Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Set top-level target output locations #1553

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

hebasto
Copy link
Member

@hebasto hebasto commented Jun 26, 2024

While testing #1551, I noticed that when cross-compiling a shared library with examples for Windows, the ctest fails to run examples with Wine. Adjusting the PATH variable in

set_tests_properties(${test_name} PROPERTIES
ENVIRONMENT "PATH=$<TARGET_FILE_DIR:secp256k1>;$ENV{PATH}"
)
does not help because WINEPATH is expected.

Another issue with the current implementation is that the examples cannot run individually on Windows.

This PR resolves both issues by reverting the implementation from #1290 in favour of the reworked and improved implementation from #1233.

Copy link
Contributor

@real-or-random real-or-random left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3779472

It's probably a good idea that the binaries just work without the need to set a PATH. And it's okay to collect all binary artifacts in a single directory, we don't have that many.

@real-or-random
Copy link
Contributor

What are your commands for building on wine?

@hebasto
Copy link
Member Author

hebasto commented Jun 26, 2024

What are your commands for building on wine?

On Ubuntu 24.04 with the wine-binfmt package installed:

$ cmake -B build --toolchain cmake/x86_64-w64-mingw32.toolchain.cmake -DSECP256K1_BUILD_EXAMPLES=ON
$ cmake --build build
$ ctest --test-dir build
Internal ctest changing into directory: /home/hebasto/git/secp256k1/secp256k1/build
Test project /home/hebasto/git/secp256k1/secp256k1/build
    Start 1: noverify_tests
1/6 Test #1: noverify_tests ...................   Passed   52.72 sec
    Start 2: tests
2/6 Test #2: tests ............................   Passed  111.58 sec
    Start 3: exhaustive_tests
3/6 Test #3: exhaustive_tests .................   Passed    8.01 sec
    Start 4: ecdsa_example
4/6 Test #4: ecdsa_example ....................   Passed    1.35 sec
    Start 5: ecdh_example
5/6 Test #5: ecdh_example .....................   Passed    1.34 sec
    Start 6: schnorr_example
6/6 Test #6: schnorr_example ..................   Passed    1.32 sec

100% tests passed, 0 tests failed out of 6

Total Test time (real) = 176.31 sec
$ ./build/bin/schnorr_example.exe 
Is the signature valid? true
Secret Key: 0x964362f6515fbb691dee49b936c8ba46dadd505eb4aa27f5db9b1ccf510f04a8
Public Key: 0x286123fee26ecfc75ec8bd6d4e175a9b4fa729e7d2bcd4034661a33dee600d80
Signature: 0xef0aa23ae13fd06710e31204a7a8ab52f0b726159b3cb2344c090220ed32d6dda958c9f7b3383c3fa7524a7f7ed54bf381c8a3bab1f8561072887dae6bf7bfe1

@fanquake
Copy link
Member

implementation from #1233.

cc @theuni

@real-or-random
Copy link
Contributor

implementation from #1233.

cc @theuni

Friendly ping @theuni :)

This change:
1. Collects build artifacts in dedicated locations.
2. Allows to run individual examples with a shared library on Windows.
3. Is compatible with Wine when testing cross-compiled Windows binaries
   on Linux.
4. Is compatible with integration the project into a larger project
   hierarchy.
@hebasto hebasto force-pushed the 240625-cmake-output branch from 3779472 to c232486 Compare September 18, 2024 17:14
@hebasto
Copy link
Member Author

hebasto commented Sep 18, 2024

Rebased.

@theuni
Copy link
Contributor

theuni commented Sep 18, 2024

I'm not sure what I'm missing here. Why does moving from src/ to bin/ fix anything? And mirroring the source tree is kinda the convention for CMake, no? I'd expect to find them in src/ anyway.

@hebasto
Copy link
Member Author

hebasto commented Sep 19, 2024

Why does moving from src/ to bin/ fix anything?

Moving built binaries from both src/ and example/ to bin/ does fix the issue because it places the executable and its dependency DLL in the same folder.

FWIW, we have a similar issue with the libbitcoinkernel shared library in Bitcoin Core.

And mirroring the source tree is kinda the convention for CMake, no?

It's the default behaviour adopted by many projects. However, here is a code snippet from the LLVM project:

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX})

Here is a quote from Professional CMake: A Practical Guide 19th Edition, section 43.5.2, about the *_OUTPUT_DIRECTORY properties:

A common use of these target properties is to collect libraries and executables together in a similar directory structure as they would have when installed. This is helpful if applications expect various resources to be located at a particular location relative to the executable’s binary. On Windows, it can also simplify debugging, since executables and DLLs can be collected into the same directory, allowing the executables to find their DLL dependencies automatically (this isn’t needed on other platforms, since RPATH support embeds the necessary locations in the binaries themselves).

@theuni
Copy link
Contributor

theuni commented Sep 19, 2024

Ok, I see. I think (from googling) the part that I was missing is that dll's are put in CMAKE_RUNTIME_OUTPUT_DIRECTORY rather than CMAKE_LIBRARY_OUTPUT_DIRECTORY as I would've expected. Is that correct?

For Linux at least, .so's go to CMAKE_LIBRARY_OUTPUT_DIRECTORY.

@real-or-random
Copy link
Contributor

Ok, I see. I think (from googling) the part that I was missing is that dll's are put in CMAKE_RUNTIME_OUTPUT_DIRECTORY rather than CMAKE_LIBRARY_OUTPUT_DIRECTORY as I would've expected. Is that correct?

This matches the CMake docs: The file is a "runtime" output when add_library() is called with the SHARED option (which may be implied), and it's a "library" output when add_library() is called with MODULE (which is intended for modules/plugins loaded dynamically at runtime.

@real-or-random
Copy link
Contributor

ping @theuni

@theuni
Copy link
Contributor

theuni commented Oct 15, 2024

Concept ACK and utACK c232486.

Discussed with @hebasto in person. We've decided to switch all of Core's CMake projects to use this layout (barring any unforeseen issues).

Copy link
Contributor

@real-or-random real-or-random left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK c232486

@real-or-random real-or-random merged commit e59158b into bitcoin-core:master Oct 15, 2024
116 checks passed
hebasto added a commit to hebasto/bitcoin that referenced this pull request Oct 16, 2024
4f64b9f4cd build: Drop no longer needed  `-fvisibility=hidden` compiler option
5d978f1899 ci: Run `tools/symbol-check.py`
258dba9e11 test: Add `tools/symbol-check.py`
3144ba99f3 Introduce `SECP256K1_LOCAL_VAR` macro
e2571385e0 Do not export `secp256k1_musig_nonce_gen_internal`
e59158b6eb Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
18f9b967c2 Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
5bab8f6d3c examples: make key generation doc consistent
e8908221a4 examples: do not retry generating seckey randomness in musig
70b6be1834 extrakeys: improve doc of keypair_create (don't suggest retry)
01b5893389 Merge bitcoin-core/secp256k1#1599: bitcoin#1570 improve examples: remove key generation loop
cd4f84f3ba Improve examples/documentation: remove key generation loops
a88aa93506 Merge bitcoin-core/secp256k1#1603: f can never equal -m
3660fe5e2a Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
168c92011f build: allow enabling the musig module in cmake
f411841a46 Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
0be79660f3 util: add constant-time is_zero_array function
c8fbdb1b97 group: add ge_to_bytes_ext and ge_from_bytes_ext
ef7ff03407 f can never equal -m
c232486d84 Revert "cmake: Set `ENVIRONMENT` property for examples on Windows"
26e4a7c214 cmake: Set top-level target output locations
4c57c7a5a9 Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code
472faaa8ee Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
292310fbb2 doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
85e224dd97 group: add ge_to_bytes and ge_from_bytes
7c987ec89e cmake: Call `enable_testing()` unconditionally
6aa576515e cmake: Delete `CTest` module

git-subtree-dir: src/secp256k1
git-subtree-split: 4f64b9f4cdf130d2c6d6b7bd855a04faf6f88e08
@hebasto
Copy link
Member Author

hebasto commented Oct 16, 2024

This change might need a note in the CHANGELOG.md, no?

achow101 added a commit to achow101/bitcoin that referenced this pull request Oct 24, 2024
68b55209f1b Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points
f0868a9b3d8 Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows
1fae76f50c0 Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API
8be3839fb2e Remove unused scratch space from API
57eda3ba300 musig: ctimetests: fix _declassify range for generated nonce points
e59158b6eb7 Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
18f9b967c25 Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
5bab8f6d3c4 examples: make key generation doc consistent
e8908221a45 examples: do not retry generating seckey randomness in musig
70b6be1834e extrakeys: improve doc of keypair_create (don't suggest retry)
01b5893389e Merge bitcoin-core/secp256k1#1599: bitcoin#1570 improve examples: remove key generation loop
cd4f84f3ba8 Improve examples/documentation: remove key generation loops
a88aa935063 Merge bitcoin-core/secp256k1#1603: f can never equal -m
3660fe5e2a9 Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
168c92011f5 build: allow enabling the musig module in cmake
f411841a46b Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
0be79660f38 util: add constant-time is_zero_array function
c8fbdb1b972 group: add ge_to_bytes_ext and ge_from_bytes_ext
ef7ff03407f f can never equal -m
c232486d84e Revert "cmake: Set `ENVIRONMENT` property for examples on Windows"
26e4a7c2146 cmake: Set top-level target output locations
4c57c7a5a95 Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code
447334cb06d include: Avoid visibility("default") on Windows
472faaa8ee6 Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
292310fbb24 doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
85e224dd97f group: add ge_to_bytes and ge_from_bytes
7c987ec89e6 cmake: Call `enable_testing()` unconditionally
6aa576515ef cmake: Delete `CTest` module

git-subtree-dir: src/secp256k1
git-subtree-split: 68b55209f1ba3e6c0417789598f5f75649e9c14c
@hebasto hebasto deleted the 240625-cmake-output branch October 26, 2024 15:54
vmta added a commit to umkoin/umkoin that referenced this pull request Oct 29, 2024
1464f15c8 Merge bitcoin-core/secp256k1#1625: util: Remove unused (u)int64_t formatting macros
980c08df8 util: Remove unused (u)int64_t formatting macros
9b7c59cbb Merge bitcoin-core/secp256k1#1624: ci: Update macOS image
096e3e23f ci: Update macOS image
68b55209f Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points
f0868a9b3 Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows
1fae76f50 Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API
8be3839fb Remove unused scratch space from API
57eda3ba3 musig: ctimetests: fix _declassify range for generated nonce points
e59158b6e Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
18f9b967c Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
5bab8f6d3 examples: make key generation doc consistent
e8908221a examples: do not retry generating seckey randomness in musig
70b6be183 extrakeys: improve doc of keypair_create (don't suggest retry)
01b589338 Merge bitcoin-core/secp256k1#1599: #1570 improve examples: remove key generation loop
cd4f84f3b Improve examples/documentation: remove key generation loops
a88aa9350 Merge bitcoin-core/secp256k1#1603: f can never equal -m
3660fe5e2 Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
168c92011 build: allow enabling the musig module in cmake
f411841a4 Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
0be79660f util: add constant-time is_zero_array function
c8fbdb1b9 group: add ge_to_bytes_ext and ge_from_bytes_ext
ef7ff0340 f can never equal -m
c232486d8 Revert "cmake: Set `ENVIRONMENT` property for examples on Windows"
26e4a7c21 cmake: Set top-level target output locations
4c57c7a5a Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code
447334cb0 include: Avoid visibility("default") on Windows
472faaa8e Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
292310fbb doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
2f2ccc469 Merge bitcoin-core/secp256k1#1600: cmake: Introduce `SECP256K1_APPEND_LDFLAGS` variable
421ed1b46 cmake: Introduce `SECP256K1_APPEND_LDFLAGS` variable
85e224dd9 group: add ge_to_bytes and ge_from_bytes
198885507 Merge bitcoin-core/secp256k1#1586: fix: remove duplicate 'the' from header file comment
b30761440 Merge bitcoin-core/secp256k1#1583: ci: Bump GCC_SNAPSHOT_MAJOR to 15
fa67b6752 refactor: Use array initialization for unterminated strings
9b0f37bff fix: remove duplicate 'the' from header file comment
e34b47673 ci: Bump GCC_SNAPSHOT_MAJOR to 15
3fdf146ba Merge bitcoin-core/secp256k1#1578: ci: Silent Homebrew's noisy reinstall warnings
f8c1b0e0e Merge bitcoin-core/secp256k1#1577: release cleanup: bump version after 0.5.1
7057d3c9a ci: Silent Homebrew's noisy reinstall warnings
c3e40d75d release cleanup: bump version after 0.5.1
642c885b6 Merge bitcoin-core/secp256k1#1575: release: prepare for 0.5.1
cdf08c1a2 Merge bitcoin-core/secp256k1#1576: doc: mention `needs-changelog` github label in release process
40d87b8e4 release: prepare for 0.5.1
577022617 changelog: clarify CMake option
759bd4bbc doc: mention `needs-changelog` github label in release process
fded437c4 Merge bitcoin-core/secp256k1#1574: Fix compilation when extrakeys module isn't enabled
763d938cf ci: only enable extrakeys module when schnorrsig is enabled
af551ab9d tests: do not use functions from extrakeys module
0055b8678 Merge bitcoin-core/secp256k1#1551: Add ellswift usage example
ea2d5f0f1 Merge bitcoin-core/secp256k1#1563: doc: Add convention for defaults
ca06e58b2 Merge bitcoin-core/secp256k1#1564: build, ci: Adjust the default size of the precomputed table for signing
e2af49126 ci: Switch to the new default value of the precomputed table for signing
d94a9273f build: Adjust the default size of the precomputed table for signing
fcc5d7381 Merge bitcoin-core/secp256k1#1565: cmake: Bump CMake minimum required version up to 3.16
9420eece2 cmake: Bump CMake minimum required version up to 3.16
16685649d doc: Add convention for defaults
a5269373f Merge bitcoin-core/secp256k1#1555: Fixed O3 replacement
b8fe33332 cmake: Fixed O3 replacement
7c987ec89 cmake: Call `enable_testing()` unconditionally
6aa576515 cmake: Delete `CTest` module
31f84595c Add ellswift usage example
fe4fbaa7f examples: fix case typos in secret clearing paragraphs (s/, Or/, or/)
4af241b32 Merge bitcoin-core/secp256k1#1535: build: Replace hardcoded "auto" value with default one
f473c959f Merge bitcoin-core/secp256k1#1543: cmake: Do not modify build types when integrating by downstream project
d403eea48 Merge bitcoin-core/secp256k1#1546: cmake: Rename `SECP256K1_LATE_CFLAGS` and switch to Bitcoin Core's approach
d7ae25ce6 Merge bitcoin-core/secp256k1#1550: fix: typos in secp256k1.c
0e2fadb20 fix: typos in secp256k1.c
69b2192ad Merge bitcoin-core/secp256k1#1545: cmake: Do not set `CTEST_TEST_TARGET_ALIAS`
5dd637f3c Merge bitcoin-core/secp256k1#1548: README: mention ellswift module
7454a5373 README: mention ellswift module
4706be2cd cmake: Reimplement `SECP256K1_APPEND_CFLAGS` using Bitcoin Core approach
c2764dbb9 cmake: Rename `SECP256K1_LATE_CFLAGS` to `SECP256K1_APPEND_CFLAGS`
f87a3589f cmake: Do not set `CTEST_TEST_TARGET_ALIAS`
158f9e5ea cmake: Do not modify build types when integrating by downstream project
35c0fdc86 Merge bitcoin-core/secp256k1#1529: cmake: Fix cache issue when integrating by downstream project
4392f0f71 Merge bitcoin-core/secp256k1#1533: tests: refactor: tidy up util functions (#1491)
bedffd53d Merge bitcoin-core/secp256k1#1488: ci: Add native macOS arm64 job
4b8d5eeac Merge bitcoin-core/secp256k1#1532: cmake: Disable eager MSan in ctime_tests
f55703ba4 autotools: Delete unneeded compiler test
396e88588 autotools: Align MSan checking code with CMake's implementation
abde59f52 cmake: Report more compiler details in summary
7abf979a4 cmake: Disable `ctime_tests` if build with `-fsanitize=memory`
4d9645bee cmake: Remove "AUTO" value of `SECP256K1_ECMULT_GEN_KB` option
a06805ee7 cmake: Remove "AUTO" value of `SECP256K1_ECMULT_WINDOW_SIZE` option
1791f6fce Merge bitcoin-core/secp256k1#1517: autotools: Disable eager MSan in ctime_tests
26b94ee92 autotools: Remove "auto" value of `--with-ecmult-gen-kb` option
122dbaeb3 autotools: Remove "auto" value of `--with-ecmult-window` option
e73f6f8fd tests: refactor: drop `secp256k1_` prefix from testrand.h functions
0ee7453a9 tests: refactor: add `testutil_` prefix to testutil.h functions
0c6bc76dc tests: refactor: move `random_` helpers from tests.c to testutil.h
0fef8479b tests: refactor: rename `random_field_element_magnitude` -> `random_fe_magnitude`
59db007f0 tests: refactor: rename `random_group_element_...` -> `random_ge_...`
ebfb82ee2 ci: Add job with -fsanitize-memory-param-retval
e1bef0961 configure: Move "experimental" warning to bottom
55e5d975d autotools: Disable eager MSan in ctime_tests
06bff6dec Merge bitcoin-core/secp256k1#1528: tests: call `secp256k1_ecmult_multi_var` with a non-`NULL` error callback
ec4c002fa cmake: Simplify `PROJECT_IS_TOP_LEVEL` emulation
cae9a7ad1 cmake: Do not set emulated PROJECT_IS_TOP_LEVEL as cache variable
4155e62fc Merge bitcoin-core/secp256k1#1526: cmake: Fix `check_arm32_assembly` when using as subproject
9554362b1 tests: call secp256k1_ecmult_multi_var with a non-NULL error callback
9f4c8cd73 cmake: Fix `check_arm32_assembly` when using as subproject
7712a5306 Merge bitcoin-core/secp256k1#1524: check-abi: explicitly provide public headers
7d0bc0870 Merge bitcoin-core/secp256k1#1525: changelog: Correct 0.5.0 release date
d45d9b74b changelog: Correct 0.5.0 release date
d7f6613db Merge bitcoin-core/secp256k1#1523: release cleanup: bump version after 0.5.0
2f05e2da4 release cleanup: bump version after 0.5.0
e3a885d42 Merge bitcoin-core/secp256k1#1522: release: prepare for 0.5.0
dd695563e check-abi: explicitly provide public headers
c0e4ec3fe release: prepare for 0.5.0
bb528cfb0 Merge bitcoin-core/secp256k1#1518: Add secp256k1_pubkey_sort
7d2591ce1 Add secp256k1_pubkey_sort
218f0cc93 ci: Add native macOS arm64 job

git-subtree-dir: src/secp256k1
git-subtree-split: 1464f15c812b00de0f3d397b3cfb67d1f91f6967
achow101 added a commit to achow101/bitcoin that referenced this pull request Nov 1, 2024
a38d879a1a6 Merge bitcoin-core/secp256k1#1628: Name public API structs
7d48f5ed02e Merge bitcoin-core/secp256k1#1581: test, ci: Lower default iteration count to 16
694342fdb71 Name public API structs
0f73caf7c62 test, ci: Lower default iteration count to 16
9a8db52f4e9 Merge bitcoin-core/secp256k1#1582: cmake, test: Add `secp256k1_` prefix to test names
1464f15c812 Merge bitcoin-core/secp256k1#1625: util: Remove unused (u)int64_t formatting macros
980c08df80a util: Remove unused (u)int64_t formatting macros
9b7c59cbb90 Merge bitcoin-core/secp256k1#1624: ci: Update macOS image
096e3e23f63 ci: Update macOS image
68b55209f1b Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points
f0868a9b3d8 Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows
1fae76f50c0 Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API
8be3839fb2e Remove unused scratch space from API
57eda3ba300 musig: ctimetests: fix _declassify range for generated nonce points
87384f5c0f2 cmake, test: Add `secp256k1_` prefix to test names
e59158b6eb7 Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
18f9b967c25 Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
5bab8f6d3c4 examples: make key generation doc consistent
e8908221a45 examples: do not retry generating seckey randomness in musig
70b6be1834e extrakeys: improve doc of keypair_create (don't suggest retry)
01b5893389e Merge bitcoin-core/secp256k1#1599: bitcoin#1570 improve examples: remove key generation loop
cd4f84f3ba8 Improve examples/documentation: remove key generation loops
a88aa935063 Merge bitcoin-core/secp256k1#1603: f can never equal -m
3660fe5e2a9 Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
168c92011f5 build: allow enabling the musig module in cmake
f411841a46b Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
0be79660f38 util: add constant-time is_zero_array function
c8fbdb1b972 group: add ge_to_bytes_ext and ge_from_bytes_ext
ef7ff03407f f can never equal -m
c232486d84e Revert "cmake: Set `ENVIRONMENT` property for examples on Windows"
26e4a7c2146 cmake: Set top-level target output locations
4c57c7a5a95 Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code
447334cb06d include: Avoid visibility("default") on Windows
472faaa8ee6 Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
292310fbb24 doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
85e224dd97f group: add ge_to_bytes and ge_from_bytes
7c987ec89e6 cmake: Call `enable_testing()` unconditionally
6aa576515ef cmake: Delete `CTest` module

git-subtree-dir: src/secp256k1
git-subtree-split: a38d879a1a6091bbbf504b42f8ca9ae6d76325a0
@jonasnick jonasnick mentioned this pull request Nov 4, 2024
3 tasks
achow101 added a commit to achow101/bitcoin that referenced this pull request Nov 4, 2024
0cdc758a563 Merge bitcoin-core/secp256k1#1631: release: prepare for 0.6.0
39d5dfd542a release: prepare for 0.6.0
df2eceb2790 build: add ellswift.md and musig.md to release tarball
a306bb7e903 tools: fix check-abi.sh after cmake out locations were changed
145868a84d2 Do not export `secp256k1_musig_nonce_gen_internal`
b161bffb8bf Merge bitcoin-core/secp256k1#1579: Clear sensitive memory without getting optimized out (revival of bitcoin#636)
a38d879a1a6 Merge bitcoin-core/secp256k1#1628: Name public API structs
7d48f5ed02e Merge bitcoin-core/secp256k1#1581: test, ci: Lower default iteration count to 16
694342fdb71 Name public API structs
0f73caf7c62 test, ci: Lower default iteration count to 16
9a8db52f4e9 Merge bitcoin-core/secp256k1#1582: cmake, test: Add `secp256k1_` prefix to test names
765ef53335a Clear _gej instances after point multiplication to avoid potential leaks
349e6ab916b Introduce separate _clear functions for hash module
99cc9fd6d01 Don't rely on memset to set signed integers to 0
97c57f42ba8 Implement various _clear() functions with secp256k1_memclear()
9bb368d1466 Use secp256k1_memclear() to clear stack memory instead of memset()
e3497bbf001 Separate between clearing memory and setting to zero in tests
d79a6ccd43a Separate secp256k1_fe_set_int( . , 0 ) from secp256k1_fe_clear()
1c081262227 Add secp256k1_memclear() for clearing secret data
1464f15c812 Merge bitcoin-core/secp256k1#1625: util: Remove unused (u)int64_t formatting macros
980c08df80a util: Remove unused (u)int64_t formatting macros
9b7c59cbb90 Merge bitcoin-core/secp256k1#1624: ci: Update macOS image
096e3e23f63 ci: Update macOS image
e7d384488e8 Don't clear secrets in pippenger implementation
68b55209f1b Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points
f0868a9b3d8 Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows
1fae76f50c0 Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API
8be3839fb2e Remove unused scratch space from API
57eda3ba300 musig: ctimetests: fix _declassify range for generated nonce points
87384f5c0f2 cmake, test: Add `secp256k1_` prefix to test names
e59158b6eb7 Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
18f9b967c25 Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
5bab8f6d3c4 examples: make key generation doc consistent
e8908221a45 examples: do not retry generating seckey randomness in musig
70b6be1834e extrakeys: improve doc of keypair_create (don't suggest retry)
01b5893389e Merge bitcoin-core/secp256k1#1599: bitcoin#1570 improve examples: remove key generation loop
cd4f84f3ba8 Improve examples/documentation: remove key generation loops
a88aa935063 Merge bitcoin-core/secp256k1#1603: f can never equal -m
3660fe5e2a9 Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
168c92011f5 build: allow enabling the musig module in cmake
f411841a46b Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
0be79660f38 util: add constant-time is_zero_array function
c8fbdb1b972 group: add ge_to_bytes_ext and ge_from_bytes_ext
ef7ff03407f f can never equal -m
c232486d84e Revert "cmake: Set `ENVIRONMENT` property for examples on Windows"
26e4a7c2146 cmake: Set top-level target output locations
4c57c7a5a95 Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code
447334cb06d include: Avoid visibility("default") on Windows
472faaa8ee6 Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
292310fbb24 doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
85e224dd97f group: add ge_to_bytes and ge_from_bytes
7c987ec89e6 cmake: Call `enable_testing()` unconditionally
6aa576515ef cmake: Delete `CTest` module

git-subtree-dir: src/secp256k1
git-subtree-split: 0cdc758a56360bf58a851fe91085a327ec97685a
Eunovo added a commit to Eunovo/bitcoin that referenced this pull request Nov 12, 2024
9827fbfd41 Setup batch experimental module on cmake
89a54e23de Clear warnings
fb52de16b9 WIP: Silent merge conflicts
f1a167edff batch: Generate graphs for batch verification speed up
63823d9423 batch, extrakeys: Add benchmark for batch verify and `tweak_add_check`
b2f217c0ec batch: Add tests for `batch_add_*` APIs
ac564e9a23 batch,ecmult: Add tests for core batch APIs and `strauss_batch` refactor
f0c9b8801d batch: Add API usage example
3ab4a4c81e batch: Add `batch_add_*` APIs
ee9c242a80 batch, ecmult: Add `batch_verify` API and refactor `strauss_batch`
a00fbe43aa batch: Add `create` and `destroy` APIs
e7e627fa52 batch: Initialize an experimental batch module
0cdc758a56 Merge bitcoin-core/secp256k1#1631: release: prepare for 0.6.0
39d5dfd542 release: prepare for 0.6.0
df2eceb279 build: add ellswift.md and musig.md to release tarball
a306bb7e90 tools: fix check-abi.sh after cmake out locations were changed
145868a84d Do not export `secp256k1_musig_nonce_gen_internal`
b161bffb8b Merge bitcoin-core/secp256k1#1579: Clear sensitive memory without getting optimized out (revival of bitcoin#636)
a38d879a1a Merge bitcoin-core/secp256k1#1628: Name public API structs
7d48f5ed02 Merge bitcoin-core/secp256k1#1581: test, ci: Lower default iteration count to 16
694342fdb7 Name public API structs
0f73caf7c6 test, ci: Lower default iteration count to 16
9a8db52f4e Merge bitcoin-core/secp256k1#1582: cmake, test: Add `secp256k1_` prefix to test names
765ef53335 Clear _gej instances after point multiplication to avoid potential leaks
349e6ab916 Introduce separate _clear functions for hash module
99cc9fd6d0 Don't rely on memset to set signed integers to 0
97c57f42ba Implement various _clear() functions with secp256k1_memclear()
9bb368d146 Use secp256k1_memclear() to clear stack memory instead of memset()
e3497bbf00 Separate between clearing memory and setting to zero in tests
d79a6ccd43 Separate secp256k1_fe_set_int( . , 0 ) from secp256k1_fe_clear()
1c08126222 Add secp256k1_memclear() for clearing secret data
1464f15c81 Merge bitcoin-core/secp256k1#1625: util: Remove unused (u)int64_t formatting macros
980c08df80 util: Remove unused (u)int64_t formatting macros
9b7c59cbb9 Merge bitcoin-core/secp256k1#1624: ci: Update macOS image
096e3e23f6 ci: Update macOS image
e7d384488e Don't clear secrets in pippenger implementation
68b55209f1 Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points
f0868a9b3d Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows
1fae76f50c Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API
8be3839fb2 Remove unused scratch space from API
57eda3ba30 musig: ctimetests: fix _declassify range for generated nonce points
87384f5c0f cmake, test: Add `secp256k1_` prefix to test names
e59158b6eb Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
18f9b967c2 Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
5bab8f6d3c examples: make key generation doc consistent
e8908221a4 examples: do not retry generating seckey randomness in musig
70b6be1834 extrakeys: improve doc of keypair_create (don't suggest retry)
01b5893389 Merge bitcoin-core/secp256k1#1599: bitcoin#1570 improve examples: remove key generation loop
cd4f84f3ba Improve examples/documentation: remove key generation loops
a88aa93506 Merge bitcoin-core/secp256k1#1603: f can never equal -m
3660fe5e2a Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
168c92011f build: allow enabling the musig module in cmake
f411841a46 Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
0be79660f3 util: add constant-time is_zero_array function
c8fbdb1b97 group: add ge_to_bytes_ext and ge_from_bytes_ext
ef7ff03407 f can never equal -m
c232486d84 Revert "cmake: Set `ENVIRONMENT` property for examples on Windows"
26e4a7c214 cmake: Set top-level target output locations
4c57c7a5a9 Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code
447334cb06 include: Avoid visibility("default") on Windows
472faaa8ee Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
292310fbb2 doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
85e224dd97 group: add ge_to_bytes and ge_from_bytes
7c987ec89e cmake: Call `enable_testing()` unconditionally
6aa576515e cmake: Delete `CTest` module

git-subtree-dir: src/secp256k1
git-subtree-split: 9827fbfd4164080b3de5e1238bc75fb4f07dd5e1
vmta added a commit to umkoin/umkoin that referenced this pull request Nov 21, 2024
8deef00b3 Merge bitcoin-core/secp256k1#1634: Fix some misspellings
39705450e Fix some misspellings
ec329c250 Merge bitcoin-core/secp256k1#1633: release cleanup: bump version after 0.6.0
c97059f59 release cleanup: bump version after 0.6.0
0cdc758a5 Merge bitcoin-core/secp256k1#1631: release: prepare for 0.6.0
39d5dfd54 release: prepare for 0.6.0
df2eceb27 build: add ellswift.md and musig.md to release tarball
a306bb7e9 tools: fix check-abi.sh after cmake out locations were changed
145868a84 Do not export `secp256k1_musig_nonce_gen_internal`
b161bffb8 Merge bitcoin-core/secp256k1#1579: Clear sensitive memory without getting optimized out (revival of #636)
a38d879a1 Merge bitcoin-core/secp256k1#1628: Name public API structs
7d48f5ed0 Merge bitcoin-core/secp256k1#1581: test, ci: Lower default iteration count to 16
694342fdb Name public API structs
0f73caf7c test, ci: Lower default iteration count to 16
9a8db52f4 Merge bitcoin-core/secp256k1#1582: cmake, test: Add `secp256k1_` prefix to test names
765ef5333 Clear _gej instances after point multiplication to avoid potential leaks
349e6ab91 Introduce separate _clear functions for hash module
99cc9fd6d Don't rely on memset to set signed integers to 0
97c57f42b Implement various _clear() functions with secp256k1_memclear()
9bb368d14 Use secp256k1_memclear() to clear stack memory instead of memset()
e3497bbf0 Separate between clearing memory and setting to zero in tests
d79a6ccd4 Separate secp256k1_fe_set_int( . , 0 ) from secp256k1_fe_clear()
1c0812622 Add secp256k1_memclear() for clearing secret data
1464f15c8 Merge bitcoin-core/secp256k1#1625: util: Remove unused (u)int64_t formatting macros
980c08df8 util: Remove unused (u)int64_t formatting macros
9b7c59cbb Merge bitcoin-core/secp256k1#1624: ci: Update macOS image
096e3e23f ci: Update macOS image
e7d384488 Don't clear secrets in pippenger implementation
68b55209f Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points
f0868a9b3 Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows
1fae76f50 Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API
8be3839fb Remove unused scratch space from API
57eda3ba3 musig: ctimetests: fix _declassify range for generated nonce points
87384f5c0 cmake, test: Add `secp256k1_` prefix to test names
e59158b6e Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
18f9b967c Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
5bab8f6d3 examples: make key generation doc consistent
e8908221a examples: do not retry generating seckey randomness in musig
70b6be183 extrakeys: improve doc of keypair_create (don't suggest retry)
01b589338 Merge bitcoin-core/secp256k1#1599: #1570 improve examples: remove key generation loop
cd4f84f3b Improve examples/documentation: remove key generation loops
a88aa9350 Merge bitcoin-core/secp256k1#1603: f can never equal -m
3660fe5e2 Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
168c92011 build: allow enabling the musig module in cmake
f411841a4 Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
0be79660f util: add constant-time is_zero_array function
c8fbdb1b9 group: add ge_to_bytes_ext and ge_from_bytes_ext
ef7ff0340 f can never equal -m
c232486d8 Revert "cmake: Set `ENVIRONMENT` property for examples on Windows"
26e4a7c21 cmake: Set top-level target output locations
4c57c7a5a Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code
447334cb0 include: Avoid visibility("default") on Windows
472faaa8e Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
292310fbb doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
2f2ccc469 Merge bitcoin-core/secp256k1#1600: cmake: Introduce `SECP256K1_APPEND_LDFLAGS` variable
421ed1b46 cmake: Introduce `SECP256K1_APPEND_LDFLAGS` variable
85e224dd9 group: add ge_to_bytes and ge_from_bytes
198885507 Merge bitcoin-core/secp256k1#1586: fix: remove duplicate 'the' from header file comment
b30761440 Merge bitcoin-core/secp256k1#1583: ci: Bump GCC_SNAPSHOT_MAJOR to 15
fa67b6752 refactor: Use array initialization for unterminated strings
9b0f37bff fix: remove duplicate 'the' from header file comment
e34b47673 ci: Bump GCC_SNAPSHOT_MAJOR to 15
7c987ec89 cmake: Call `enable_testing()` unconditionally
6aa576515 cmake: Delete `CTest` module

git-subtree-dir: src/secp256k1
git-subtree-split: 8deef00b33ca81202aca80fe0bcd9730f084fbd2
vmta added a commit to umkoin/umkoin that referenced this pull request Nov 22, 2024
8deef00b3 Merge bitcoin-core/secp256k1#1634: Fix some misspellings
39705450e Fix some misspellings
ec329c250 Merge bitcoin-core/secp256k1#1633: release cleanup: bump version after 0.6.0
c97059f59 release cleanup: bump version after 0.6.0
0cdc758a5 Merge bitcoin-core/secp256k1#1631: release: prepare for 0.6.0
39d5dfd54 release: prepare for 0.6.0
df2eceb27 build: add ellswift.md and musig.md to release tarball
a306bb7e9 tools: fix check-abi.sh after cmake out locations were changed
145868a84 Do not export `secp256k1_musig_nonce_gen_internal`
b161bffb8 Merge bitcoin-core/secp256k1#1579: Clear sensitive memory without getting optimized out (revival of #636)
a38d879a1 Merge bitcoin-core/secp256k1#1628: Name public API structs
7d48f5ed0 Merge bitcoin-core/secp256k1#1581: test, ci: Lower default iteration count to 16
694342fdb Name public API structs
0f73caf7c test, ci: Lower default iteration count to 16
9a8db52f4 Merge bitcoin-core/secp256k1#1582: cmake, test: Add `secp256k1_` prefix to test names
765ef5333 Clear _gej instances after point multiplication to avoid potential leaks
349e6ab91 Introduce separate _clear functions for hash module
99cc9fd6d Don't rely on memset to set signed integers to 0
97c57f42b Implement various _clear() functions with secp256k1_memclear()
9bb368d14 Use secp256k1_memclear() to clear stack memory instead of memset()
e3497bbf0 Separate between clearing memory and setting to zero in tests
d79a6ccd4 Separate secp256k1_fe_set_int( . , 0 ) from secp256k1_fe_clear()
1c0812622 Add secp256k1_memclear() for clearing secret data
1464f15c8 Merge bitcoin-core/secp256k1#1625: util: Remove unused (u)int64_t formatting macros
980c08df8 util: Remove unused (u)int64_t formatting macros
9b7c59cbb Merge bitcoin-core/secp256k1#1624: ci: Update macOS image
096e3e23f ci: Update macOS image
e7d384488 Don't clear secrets in pippenger implementation
68b55209f Merge bitcoin-core/secp256k1#1619: musig: ctimetests: fix _declassify range for generated nonce points
f0868a9b3 Merge bitcoin-core/secp256k1#1595: build: 45839th attempt to fix symbol visibility on Windows
1fae76f50 Merge bitcoin-core/secp256k1#1620: Remove unused scratch space from API
8be3839fb Remove unused scratch space from API
57eda3ba3 musig: ctimetests: fix _declassify range for generated nonce points
87384f5c0 cmake, test: Add `secp256k1_` prefix to test names
e59158b6e Merge bitcoin-core/secp256k1#1553: cmake: Set top-level target output locations
18f9b967c Merge bitcoin-core/secp256k1#1616: examples: do not retry generating seckey randomness in musig
5bab8f6d3 examples: make key generation doc consistent
e8908221a examples: do not retry generating seckey randomness in musig
70b6be183 extrakeys: improve doc of keypair_create (don't suggest retry)
01b589338 Merge bitcoin-core/secp256k1#1599: #1570 improve examples: remove key generation loop
cd4f84f3b Improve examples/documentation: remove key generation loops
a88aa9350 Merge bitcoin-core/secp256k1#1603: f can never equal -m
3660fe5e2 Merge bitcoin-core/secp256k1#1479: Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
168c92011 build: allow enabling the musig module in cmake
f411841a4 Add module "musig" that implements MuSig2 multi-signatures (BIP 327)
0be79660f util: add constant-time is_zero_array function
c8fbdb1b9 group: add ge_to_bytes_ext and ge_from_bytes_ext
ef7ff0340 f can never equal -m
c232486d8 Revert "cmake: Set `ENVIRONMENT` property for examples on Windows"
26e4a7c21 cmake: Set top-level target output locations
4c57c7a5a Merge bitcoin-core/secp256k1#1554: cmake: Clean up testing code
447334cb0 include: Avoid visibility("default") on Windows
472faaa8e Merge bitcoin-core/secp256k1#1604: doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
292310fbb doc: fix typos in `secp256k1_ecdsa_{recoverable_,}signature` API description
2f2ccc469 Merge bitcoin-core/secp256k1#1600: cmake: Introduce `SECP256K1_APPEND_LDFLAGS` variable
421ed1b46 cmake: Introduce `SECP256K1_APPEND_LDFLAGS` variable
85e224dd9 group: add ge_to_bytes and ge_from_bytes
198885507 Merge bitcoin-core/secp256k1#1586: fix: remove duplicate 'the' from header file comment
b30761440 Merge bitcoin-core/secp256k1#1583: ci: Bump GCC_SNAPSHOT_MAJOR to 15
fa67b6752 refactor: Use array initialization for unterminated strings
9b0f37bff fix: remove duplicate 'the' from header file comment
e34b47673 ci: Bump GCC_SNAPSHOT_MAJOR to 15
7c987ec89 cmake: Call `enable_testing()` unconditionally
6aa576515 cmake: Delete `CTest` module

git-subtree-dir: src/secp256k1
git-subtree-split: 8deef00b33ca81202aca80fe0bcd9730f084fbd2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants