Skip to content

Commit 7e253c9

Browse files
committed
squashme: rename secp_* to secp256k1_* and fix nits
1 parent 71648cf commit 7e253c9

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
2828

2929
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
3030
option(SECP256K1_DISABLE_SHARED "Disable shared library. Overrides BUILD_SHARED_LIBS." OFF)
31-
if (SECP256K1_DISABLE_SHARED)
31+
if(SECP256K1_DISABLE_SHARED)
3232
set(BUILD_SHARED_LIBS OFF)
3333
endif()
3434

src/CMakeLists.txt

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
11
# Must be included before CMAKE_INSTALL_INCLUDEDIR is used.
22
include(GNUInstallDirs)
33

4-
add_library(secp_precomputed_objs OBJECT EXCLUDE_FROM_ALL
4+
add_library(secp256k1_precomputed_objs OBJECT EXCLUDE_FROM_ALL
55
precomputed_ecmult.c
66
precomputed_ecmult_gen.c
77
)
88

99
# Add objects explicitly rather than linking to the object libs to keep them
1010
# from being exported.
11-
add_library(secp256k1 secp256k1.c $<TARGET_OBJECTS:secp_precomputed_objs>)
11+
add_library(secp256k1 secp256k1.c $<TARGET_OBJECTS:secp256k1_precomputed_objs>)
1212

13-
add_library(secp_asm INTERFACE)
13+
add_library(secp256k1_asm INTERFACE)
1414
if(SECP256K1_ASM STREQUAL "arm")
15-
add_library(secp_asm_arm OBJECT EXCLUDE_FROM_ALL)
16-
target_sources(secp_asm_arm PUBLIC
15+
add_library(secp256k1_asm_arm OBJECT EXCLUDE_FROM_ALL)
16+
target_sources(secp256k1_asm_arm PUBLIC
1717
asm/field_10x26_arm.s
1818
)
19-
target_sources(secp256k1 PRIVATE $<TARGET_OBJECTS:secp_asm_arm>)
20-
target_link_libraries(secp_asm INTERFACE secp_asm_arm)
19+
target_sources(secp256k1 PRIVATE $<TARGET_OBJECTS:secp256k1_asm_arm>)
20+
target_link_libraries(secp256k1_asm INTERFACE secp256k1_asm_arm)
2121
endif()
2222

2323
#Define our export symbol only for Win32 and only for shared libs.
24-
if (WIN32)
24+
if(WIN32)
2525
set_target_properties(secp256k1 PROPERTIES DEFINE_SYMBOL "DLL_EXPORT")
2626
endif()
2727

2828
# Object libs don't know if they're being built for a shared or static lib.
2929
# Grab the PIC property from secp256k1 which knows.
3030
get_target_property(use_pic secp256k1 POSITION_INDEPENDENT_CODE)
31-
set_target_properties(secp_precomputed_objs PROPERTIES POSITION_INDEPENDENT_CODE ${use_pic})
31+
set_target_properties(secp256k1_precomputed_objs PROPERTIES POSITION_INDEPENDENT_CODE ${use_pic})
3232

3333
target_include_directories(secp256k1 PUBLIC
3434
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
@@ -42,27 +42,27 @@ if(SECP256K1_BUILD_BENCHMARK)
4242
add_executable(bench bench.c)
4343
target_link_libraries(bench secp256k1)
4444
add_executable(bench_internal bench_internal.c)
45-
target_link_libraries(bench_internal secp_precomputed_objs secp_asm)
45+
target_link_libraries(bench_internal secp256k1_precomputed_objs secp256k1_asm)
4646
add_executable(bench_ecmult bench_ecmult.c)
47-
target_link_libraries(bench_ecmult secp_precomputed_objs secp_asm)
47+
target_link_libraries(bench_ecmult secp256k1_precomputed_objs secp256k1_asm)
4848
endif()
4949

5050
if(SECP256K1_BUILD_TESTS)
5151
add_executable(noverify_tests tests.c)
52-
target_link_libraries(noverify_tests secp_precomputed_objs secp_asm)
52+
target_link_libraries(noverify_tests secp256k1_precomputed_objs secp256k1_asm)
5353
add_test(noverify_tests noverify_tests)
5454
if(NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
5555
add_executable(tests tests.c)
5656
target_compile_definitions(tests PRIVATE VERIFY)
57-
target_link_libraries(tests secp_precomputed_objs secp_asm)
57+
target_link_libraries(tests secp256k1_precomputed_objs secp256k1_asm)
5858
add_test(tests tests)
5959
endif()
6060
endif()
6161

6262
if(SECP256K1_BUILD_EXHAUSTIVE_TESTS)
63-
# Note: do not include secp_precomputed_objs in exhaustive_tests (it uses runtime-generated tables).
63+
# Note: do not include secp256k1_precomputed_objs in exhaustive_tests (it uses runtime-generated tables).
6464
add_executable(exhaustive_tests tests_exhaustive.c)
65-
target_link_libraries(exhaustive_tests secp_asm)
65+
target_link_libraries(exhaustive_tests secp256k1_asm)
6666
target_compile_definitions(exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>)
6767
add_test(exhaustive_tests exhaustive_tests)
6868
endif()

0 commit comments

Comments
 (0)