@@ -45,14 +45,14 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W")
45
45
set (WARN_C_FLAGS "-std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings" )
46
46
set (SAVED_C_FLAGS "${CMAKE_C_FLAGS} " )
47
47
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_C_FLAGS} " )
48
- check_c_compiler_flag(CMAKE_C_FLAGS USE_WARN_CFLAGS)
48
+ check_c_compiler_flag(${ CMAKE_C_FLAGS} USE_WARN_CFLAGS)
49
49
if (NOT USE_WARN_CFLAGS)
50
50
set (CMAKE_C_FLAGS "${SAVED_C_FLAGS} " )
51
51
endif ()
52
52
53
53
set (SAVED_C_FLAGS "${CMAKE_C_FLAGS} " )
54
54
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden" )
55
- check_c_compiler_flag(CMAKE_C_FLAGS USE_OPAQUE_CFLAGS)
55
+ check_c_compiler_flag(${ CMAKE_C_FLAGS} USE_OPAQUE_CFLAGS)
56
56
if (NOT USE_OPAQUE_CFLAGS)
57
57
set (CMAKE_C_FLAGS "${SAVED_C_FLAGS} " )
58
58
endif ()
@@ -117,8 +117,8 @@ if (NOT ASM_NO)
117
117
check_c_source_compiles("\
118
118
#include <stdint.h> \n\
119
119
uint64_t a = 11, tmp; \n\
120
- int main(void) {__asm__ __volatile__(\" movq \\ @S|@ 0x100000000,%1; mulq %%rsi\" : \" +a\" (a) : \" S\" (tmp) : \" cc\" , \" %rdx\" );return 0;}" 64BIT_ASM_CHECK )
121
- if (64BIT_ASM_CHECK )
120
+ int main(void) {__asm__ __volatile__(\" movq 0x100000000,%1; mulq %%rsi\" : \" +a\" (a) : \" S\" (tmp) : \" cc\" , \" %rdx\" );return 0;}" CHECK_ASM_64BIT )
121
+ if (CHECK_ASM_64BIT )
122
122
set (ASM_x86_64 ON )
123
123
else ()
124
124
set (ASM_NO ON )
@@ -128,8 +128,8 @@ if (NOT ASM_NO)
128
128
check_c_source_compiles("\
129
129
#include <stdint.h> \n\
130
130
uint64_t a = 11, tmp; \n\
131
- int main(void) {__asm__ __volatile__(\" movq \\ @S|@ 0x100000000,%1; mulq %%rsi\" : \" +a\" (a) : \" S\" (tmp) : \" cc\" , \" %rdx\" );return 0;}" 64BIT_ASM_CHECK )
132
- if (NOT 64BIT_ASM_CHECK )
131
+ int main(void) {__asm__ __volatile__(\" movq 0x100000000,%1; mulq %%rsi\" : \" +a\" (a) : \" S\" (tmp) : \" cc\" , \" %rdx\" );return 0;}" CHECK_ASM_64BIT )
132
+ if (NOT CHECK_ASM_64BIT )
133
133
message (FATAL_ERROR "x86_64 assembly optimization requested but not available." )
134
134
endif ()
135
135
endif ()
@@ -337,6 +337,9 @@ else()
337
337
endif ()
338
338
endif ()
339
339
340
+ # Use -DBUILD_SHARED_LIBS=ON to generate SHARED library
341
+
340
342
add_subdirectory (src)
341
343
342
- # What should be here?
344
+ set_target_properties (secp256k1 PROPERTIES PUBLIC_HEADER include /secp256k1.h)
345
+ set_target_properties (secp256k1 PROPERTIES OUTPUT_NAME secp256k1)
0 commit comments