-
Notifications
You must be signed in to change notification settings - Fork 4
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
Let's give a cmake try to build per tools #2
base: main
Are you sure you want to change the base?
Conversation
Sashan
commented
Jul 13, 2024
the changes look reasonable, but you have a fixup as your first commit, not sure that will autosquash properly |
I've just force pushed repository with squashed changes. bonus: it builds on MacOS too. Gave a try 1.1.1, 3.0 3.3 and 3.4-dev everything worked fine. |
I did a bit of hacking, and a much bigger instruction comment in source/CMakeLists.txt. Mind of I simply push a fixup commit into this PR? |
This got me to test the OpenSSLConfig.cmake we produce for using an OpenSSL build without installing it, and oh boy, I found a bug (fixed in openssl/openssl#24918) |
please, go ahead and push your changes in. |
Done. Don't forget to pull... |
BTW, if you want to see what's actually happening when building: $ cmake --build ./build --verbose |
update CMakeList.txt so it can build evp_setpeer which has just landed to repository. |
@levitte it would be nice to have those changes in so everyone can build tools on windows. thanks. |
I agree. Might I encourage you to nudge others to review them? |
ping @openssl/committers for second review |
I pushed a fixup just now, changing CMakeLists.txt a little bit. This moves all the dependencies on OpenSSL to the perf library, and also declares its public include directory. With that, all executables only need to depend on the perf library, and the magic of CMake will take care of the rest. |
I've decided to use cmake to get it done. The change also removes usused variables I've found occasionally. To build performance tools on windows we must add missing pieces: - getopt() - basename() - strcasecmp() all thos implementations are homebrewed Let cmake to determine openssl version we use to build tools. In order to tell CMake which OpenSSL version to use we use env. variabe OPENSSL_ROOT_DIR which points to OpenSSL installation prefix with desired version. We build evp_fetch and providerdoall test tools for OpenSSL 3.*. We don't build those for 1.1.1.
This moves all the dependencies on OpenSSL to the perf library, and also declares its public include directory. With that, all executables only need to depend on the perf library, and the magic of CMake will take care of the rest.
…ows. - build getopt.c, basename.c, ... on windows only
…on Windows. - PUBLIC was wrong, cmake -S . -B ... ends up with error on windows, using PRIVATE got me going
please hold your new approvals/merging the cmake does not work on windows yet.
not sure if it is glitch in cmake or ninja on windows, this is triggered by addition of |
… tools on Windows. - $(PROJECT_SOURCE_DIR) vs, ${PROJECT_SOURCE_DIR} well spotted by Richard
…ormance tools on Windows. - s/target_source/target_sources