mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-12 05:32:22 +02:00
bd0287d650 Merge bitcoin-core/secp256k1#1859: field: force-inline 5x52 mul and sqr fdcf2d41e2 Merge bitcoin-core/secp256k1#1865: test: enable -Wunused-function in test suite (Fix #1831) b2d2bd362d Merge bitcoin-core/secp256k1#1860: cmake: Emulate Libtool's behavior on NetBSD and OpenBSD 87bec430bf Merge bitcoin-core/secp256k1#1867: test: musig: fix dead "aggnonce encodes two points at infinity" check 71fcd8410e field: force-inline 5x52 mul and sqr a77dacad9a test: enable -Wunused-function in test suite (Fix #1831) aea86bc350 Merge bitcoin-core/secp256k1#1864: test: refactor: simplify tests by using `_ecmult_gen_ge` helper, add test 2ee79e77e6 test: add unit test for `_ecmult_gen_ge` d7125e517d test: musig: fix dead "aggnonce encodes two points at infinity" check 1eab757207 cmake: Fix shared library versioning on OpenBSD a401c5145a cmake: Fix shared library versioning on NetBSD 8a0f4002c7 cmake, refactor: Improve documenting in `SetLibtoolAbiVersion` module acf2084aa7 cmake, refactor: Introduce `SetLibtoolAbiVersion` module 0f4a7e6bf9 Merge bitcoin-core/secp256k1#1855: bench: add internal benchmark for `secp256k1_fe_normalize_var` ca68daf8e1 test: refactor: simplify tests by using `_ecmult_gen_ge` helper 13db747f2b Merge bitcoin-core/secp256k1#1861: refactor: introduce `_ecmult_gen_ge` helper (preventing accidental gej leaks) 9e017e5062 refactor: rename `_ecmult_gen` -> `_ecmult_gen_gej` for consistency a3296d5e23 refactor: introduce `_ecmult_gen_ge` helper (preventing accidental gej leaks) c63062380f Merge bitcoin-core/secp256k1#1852: Add exhaustive test for ECDH module 240578eef5 bench: add internal benchmark for `secp256k1_fe_normalize_var` 5698e66c64 Add exhaustive test for ECDH module a39093de15 Merge bitcoin-core/secp256k1#1851: doc: correct API docs for ECDSA signing out-params (s/array/signature object/) 8363a2d8d1 Merge bitcoin-core/secp256k1#1854: tests: compare full MuSig aggregate nonce af1fdd1215 tests: compare full MuSig aggregate nonce 40a0d874a6 doc: correct API docs for ECDSA signing out-params (s/array/signature object/) b11340b3ce Merge bitcoin-core/secp256k1#1849: musig: always clear out secret key in `secp256k1_musig_nonce_gen_counter` 8479eafa57 musig: always clear out secret key in `secp256k1_musig_nonce_gen_counter` c1a9e4fe64 Merge bitcoin-core/secp256k1#1848: ci: Bump GCC snapshot major version to 17 3cca6451a2 ci: Bump GCC snapshot major version to 17 ea174fe045 Merge bitcoin-core/secp256k1#1846: ci: Replace `ilammy/msvc-dev-cmd` with manual MSVC setup 285cb788e9 ci: Replace `ilammy/msvc-dev-cmd` with manual MSVC setup git-subtree-dir: src/secp256k1 git-subtree-split: bd0287d650c24dc41e0362675a9f6a49ee952def
62 lines
2.1 KiB
CMake
62 lines
2.1 KiB
CMake
#[=[
|
|
This emulates Libtool to make sure Libtool and CMake agree on
|
|
the ABI version and file naming for shared libraries.
|
|
|
|
The `version_type` variable is set in `libtool.m4` (installed
|
|
by autoreconf into autotools-aux/m4/).
|
|
For the `major` and `versuffix` variables, see below "Calculate
|
|
the version variables" in `ltmain.sh` (installed by autoreconf
|
|
into autotools-aux/).
|
|
]=]
|
|
function(set_libtool_abi_version target current revision age)
|
|
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|FreeBSD)$")
|
|
# version_type = linux | freebsd-elf
|
|
# major = $current - $age
|
|
# versuffix = $major.$age.$revision
|
|
math(EXPR _major "${current} - ${age}")
|
|
set_target_properties(${target} PROPERTIES
|
|
SOVERSION ${_major}
|
|
VERSION ${_major}.${age}.${revision}
|
|
)
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
|
|
# version_type = sunos
|
|
# major = $current
|
|
# versuffix = $current.$revision
|
|
set_target_properties(${target} PROPERTIES
|
|
SOVERSION ${current}
|
|
VERSION ${current}.${revision}
|
|
)
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
|
# version_type = sunos
|
|
# major = $current
|
|
# versuffix = $current.$revision
|
|
set_target_properties(${target} PROPERTIES
|
|
# OpenBSD has no `soname_spec` defined in `libtool.m4`.
|
|
VERSION ${current}.${revision}
|
|
)
|
|
elseif(APPLE)
|
|
# version_type = darwin
|
|
# major = $current - $age
|
|
math(EXPR _major "${current} - ${age}")
|
|
math(EXPR _compatibility "${current} + 1")
|
|
set_target_properties(${target} PROPERTIES
|
|
SOVERSION ${_major}
|
|
MACHO_COMPATIBILITY_VERSION ${_compatibility}
|
|
MACHO_CURRENT_VERSION ${_compatibility}.${revision}
|
|
)
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
# version_type = windows
|
|
# major = $current - $age
|
|
# versuffix = $major
|
|
math(EXPR _major "${current} - ${age}")
|
|
set(_windows_name "secp256k1")
|
|
if(MSVC)
|
|
set(_windows_name "${PROJECT_NAME}")
|
|
endif()
|
|
set_target_properties(${target} PROPERTIES
|
|
ARCHIVE_OUTPUT_NAME "${_windows_name}"
|
|
RUNTIME_OUTPUT_NAME "${_windows_name}-${_major}"
|
|
)
|
|
endif()
|
|
endfunction()
|