dc0657c7622f5a13afc3876eca7e2fc7cabb9a10 build: Fix C4005 "macro redefinition" MSVC warnings in examples (Hennadii Stepanov) Pull request description: This PR: - fixes C4005 "macro redefinition" MSVC warnings in examples - removes warning suppressions in both build systems, Autotools-based and CMake-based ones ACKs for top commit: real-or-random: utACK dc0657c7622f5a13afc3876eca7e2fc7cabb9a10 Tree-SHA512: fe3bb8f06b3ff1d51e5e20754a289e0e6b99ddf4c0bd4e6e4786e2558e71e043ab23ff7782a83a902df5db28d18ae65312674c373fdc49f5af252763a22bd0fb
28 lines
767 B
CMake
28 lines
767 B
CMake
add_library(example INTERFACE)
|
|
target_include_directories(example INTERFACE
|
|
${PROJECT_SOURCE_DIR}/include
|
|
)
|
|
target_link_libraries(example INTERFACE
|
|
secp256k1
|
|
$<$<PLATFORM_ID:Windows>:bcrypt>
|
|
)
|
|
if(NOT BUILD_SHARED_LIBS AND MSVC)
|
|
target_link_options(example INTERFACE /IGNORE:4217)
|
|
endif()
|
|
|
|
add_executable(ecdsa_example ecdsa.c)
|
|
target_link_libraries(ecdsa_example example)
|
|
add_test(ecdsa_example ecdsa_example)
|
|
|
|
if(SECP256K1_ENABLE_MODULE_ECDH)
|
|
add_executable(ecdh_example ecdh.c)
|
|
target_link_libraries(ecdh_example example)
|
|
add_test(ecdh_example ecdh_example)
|
|
endif()
|
|
|
|
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
|
|
add_executable(schnorr_example schnorr.c)
|
|
target_link_libraries(schnorr_example example)
|
|
add_test(schnorr_example schnorr_example)
|
|
endif()
|