Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10615248
build_cmake.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
build_cmake.sh
View Options
#!/usr/bin/env bash
export
LC_ALL
=
C
set
-ex
read
-r -a CMAKE_EXTRA_FLAGS
<<<
"
$CMAKE_EXTRA_FLAGS
"
if
[
"x
$HOST
"
=
"xi686-linux-gnu"
]
;
then
CMAKE_EXTRA_FLAGS
+=
"-DCMAKE_C_FLAGS=-m32"
fi
if
[
"
$RUN_VALGRIND
"
=
"yes"
]
;
then
CMAKE_C_FLAGS
=
"-DVALGRIND"
if
[
"
${
CIRRUS_OS
}
"
=
"darwin"
]
;
then
# The valgrind/memcheck.h header is not in a standard cmake location when
# installed from the LouisBrunner brew repo, so we need to add it.
#CMAKE_C_FLAGS="-isystem $(brew --prefix valgrind)/include ${CMAKE_C_FLAGS}"
CMAKE_C_FLAGS
=
"-isystem /usr/local/include
${
CMAKE_C_FLAGS
}
"
fi
CMAKE_EXTRA_FLAGS
+=
"-DCMAKE_C_FLAGS=
${
CMAKE_C_FLAGS
}
"
fi
# "auto" is not a valid value for SECP256K1_ECMULT_GEN_PRECISION with cmake.
# In this case we use the default value instead by not setting the cache
# variable on the cmake command line.
if
[
"x
$ECMULTGENPRECISION
"
!
=
"xauto"
]
;
then
ECMULT_GEN_PRECISION_ARG
=
"-DSECP256K1_ECMULT_GEN_PRECISION=
$ECMULTGENPRECISION
"
fi
mkdir -p buildcmake/install
pushd
buildcmake
CMAKE_COMMAND
=
cmake
${
CMAKE_COMMAND
}
--version
${
CMAKE_COMMAND
}
-GNinja ..
\
-DCMAKE_INSTALL_PREFIX
=
install
\
-DSECP256K1_ECMULT_STATIC_PRECOMPUTATION
=
$STATICPRECOMPUTATION
\
-DSECP256K1_ENABLE_MODULE_ECDH
=
$ECDH
\
-DSECP256K1_ENABLE_MODULE_MULTISET
=
$MULTISET
\
-DSECP256K1_ENABLE_MODULE_RECOVERY
=
$RECOVERY
\
-DSECP256K1_ENABLE_MODULE_SCHNORR
=
$SCHNORR
\
-DSECP256K1_ENABLE_MODULE_EXTRAKEYS
=
$SCHNORRSIG
\
-DSECP256K1_ENABLE_MODULE_SCHNORRSIG
=
$SCHNORRSIG
\
-DSECP256K1_ENABLE_JNI
=
$JNI
\
-DSECP256K1_USE_ASM
=
$ASM
\
-DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY
=
$WIDEMUL
\
$ECMULT_GEN_PRECISION_ARG
\
"
${
CMAKE_EXTRA_FLAGS
[@]
}
"
# This limits the iterations in the benchmarks below to ITER iterations.
export
SECP256K1_BENCH_ITERS
=
"
$ITERS
"
ninja
$CMAKE_TARGET
# Print information about binaries so that we can see that the architecture is correct
file *tests
||
true
file *-bench
||
true
file libsecp256k1.*
||
true
popd
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, Nov 23, 10:02 (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4559219
Default Alt Text
build_cmake.sh (1 KB)
Attached To
rSTAGING Bitcoin ABC staging
Event Timeline
Log In to Comment