Skip to content

Commit 2d6a0c4

Browse files
committed
Merge bitcoin/bitcoin#33379: cmake: Fix regression in secp256k1.cmake
9193c3e cmake: Fix regression in `secp256k1.cmake` (Hennadii Stepanov) Pull request description: This PR fixes a regression introduced in bitcoin/bitcoin#33101 (mea culpa). From the CMake [docs](https://cmake.org/cmake/help/latest/command/enable_language.html): > The following restrictions apply to where `enable_language()` may be called: > > - It must be called in file scope, not in a function call. Fixes bitcoin/bitcoin#33153. ACKs for top commit: TheCharlatan: ACK 9193c3e furszy: ACK 9193c3e Tree-SHA512: 5f9ca2209af195a5eefefffdceae1acf650db29b371616f803b482a6b8acc4e87acc66714488520ef91d06ad4436438d9030be9979bd4c482cb5d1ce65b7f67e
2 parents d20f10a + 9193c3e commit 2d6a0c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/secp256k1.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Distributed under the MIT software license, see the accompanying
33
# file COPYING or https://opensource.org/license/mit/.
44

5+
enable_language(C)
6+
57
function(add_secp256k1 subdir)
68
message("")
79
message("Configuring secp256k1 subtree...")
@@ -30,7 +32,6 @@ function(add_secp256k1 subdir)
3032
string(STRIP "${SECP256K1_APPEND_LDFLAGS} ${APPEND_LDFLAGS}" SECP256K1_APPEND_LDFLAGS)
3133
set(SECP256K1_APPEND_LDFLAGS ${SECP256K1_APPEND_LDFLAGS} CACHE STRING "" FORCE)
3234
# We want to build libsecp256k1 with the most tested RelWithDebInfo configuration.
33-
enable_language(C)
3435
foreach(config IN LISTS CMAKE_BUILD_TYPE CMAKE_CONFIGURATION_TYPES)
3536
if(config STREQUAL "")
3637
continue()

0 commit comments

Comments
 (0)