-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable and fix for windows build by cmake project file #462
base: master
Are you sure you want to change the base?
Conversation
c3113c0
to
a4d9349
Compare
Hi @qwerity Thanks for this! Can I ask you to make the following changes?
edit: master is now updated if you'd like to rebase. |
a4d9349
to
2f4e84c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Left some review comments. It appears you are not the original author of this code - is the original author OK with you submitting this PR?
@@ -100,3 +100,6 @@ wallycore.wasm | |||
*.pdb | |||
*.ilk | |||
*.exp | |||
|
|||
.idea | |||
cmake-build-* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.idea
is already in this file, and cmake build directories should be placed outside the repo rather than listed here.
@@ -23,15 +27,15 @@ set(SECP256K1_ENABLE_MODULE_ECDH ON) | |||
set(SECP256K1_ENABLE_MODULE_RECOVERY ON) | |||
set(SECP256K1_ENABLE_MODULE_EXTRAKEYS ON) | |||
set(SECP256K1_ENABLE_MODULE_SCHNORRSIG ON) | |||
set(SECP256K1_ENABLE_MODULE_ELLSWIFT OFF) | |||
set(SECP256K1_ENABLE_MODULE_ELLSWIFT ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enabled modules here should match the ones set by configure
(which they currently do). Why are you turning on extra modules here by default?
#if (!defined(_SSIZE_T_DECLARED)) && (!defined(_ssize_t)) && (!defined(ssize_t)) | ||
#define ssize_t long long | ||
#endif | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've PR'd a different fix for this in #469
|
||
#ifndef _WIN32 | ||
#include <unistd.h> | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not compiled when building, so I don't think this change is needed.
target_include_directories(test_clear PRIVATE ${CMAKE_BINARY_DIR}) | ||
target_link_libraries(test_clear PRIVATE wallycore pthread) | ||
add_test(test_clear test_clear) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to #469
@@ -25,7 +25,7 @@ file( | |||
) | |||
|
|||
# wallycore | |||
add_library(wallycore) | |||
add_library(wallycore STATIC) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wally can (or should be able to be) build as a DLL for windows too.
Enabled by default cmake project files.
Also fixed the Windows build.
Tested for VS2019/VS2022.