-
Notifications
You must be signed in to change notification settings - Fork 133
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
New cmakelists #328
New cmakelists #328
Conversation
@an-tao please review the code and ignore the source code lint error, just a few space issue. |
It LGTM |
cmake/BuildDependencies.cmake
Outdated
# For Windows: Prevent overriding the parent project's compiler/linker ⚠️MT/MD⚠️ settings | ||
set(gtest_force_shared_crt | ||
ON | ||
CACHE BOOL "" FORCE | ||
) | ||
FetchContent_MakeAvailable(googletest) | ||
|
||
# Set build output path, this is mainly for Windows, to solve the test/unittests running 0x000135 problems | ||
set_standard_build_output(gtest) | ||
set_standard_build_output(gtest_main) | ||
set_standard_build_output(gmock) | ||
set_standard_build_output(gmock_main) | ||
endif() | ||
|
||
# spdlog | ||
if(TRANTOR_USE_SPDLOG) | ||
FetchContent_Declare(fmt URL "https://github.com/fmtlib/fmt/archive/refs/tags/10.2.1.tar.gz") | ||
FetchContent_Declare(spdlog URL "https://github.com/gabime/spdlog/archive/refs/tags/v1.13.0.tar.gz") | ||
FetchContent_MakeAvailable(fmt spdlog) |
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 questions regarding how are we going to maintain these. I have a feeling that without a need, these automatic dependency management will get out of sync with what's available and we won't have the main/brain power to maintain these.
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 is mainly for windows, and who don't want to install conan and vcpkg(it not easy to install it in some areas, such china mainland).
Do you know a way to download the latest release version?
Using this https://github.com/randombit/botan/archive/refs/heads/master.zip
is the latest develop version.
and using conan needs maintain the libs version also.
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.
Trantor does not depend on the fmt library.
and if we fetch the source code of the famous libraries and build them into trantor, this can lead some version conflicts with the same libraries in OS used by users.
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.
spdlog needs fmt libray. if using conan or vcpkg, it will download it and build it automaticly.
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.
Why don't we use the denpendencies mantained by vcpkg or connan.
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.
Why don't we use the denpendencies mantained by vcpkg or connan.
Succesfully install vcpkg is not so easy due to git clone interupt(actully, I didn't install it successful at all).
conan works fine, It just provide a third way.
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.
Users can use vcpkg or canon to manager dependencies on windows.
for fmt, you could install it by vcpkg (or conan), for example:
.\vcpkg.exe install fmt:x64-windows
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.
Users can use vcpkg or canon to manager dependencies on windows. for fmt, you could install it by vcpkg (or conan), for example:
.\vcpkg.exe install fmt:x64-windows
I know it. if vcpkg installed successfully.
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.
If don't want to use CMAKE FectchContent as an option BUILD_DEPENDENCIES, I can delete these code.
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.
Users can use vcpkg or canon to manager dependencies on windows. for fmt, you could install it by vcpkg (or conan), for example:
.\vcpkg.exe install fmt:x64-windows
And add vcpkg.json
to this project could let vcpkg works on manifest mode, then just run vcpkg install
.
the vcpkg.json
is maintenainced at vcpkg ports already.
deps.macos-12.sh
Outdated
#!/bin/bash | ||
|
||
# This script is used to install dependencies on MacOS 12.0 or newer | ||
# botan v3 | ||
brew install googletest spdlog c-ares openssl@3 botan |
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.
DITTO (and other dep installing scripts), how are we going to keep these from getting out-of-date?
@marty1885 Sometimes, we can't follow the latest library version, and need control/limit it, do you agree? |
@hks2002 I'll look into it. It seems to be caused by missing ranges support in Mac's clang. I introduced Botan as a backup option in case OpenSSL screwed up again and gave up another Heartbleed. And as a platform to stop me from over-designing the TLS backend towards OpenSSL. We don't need to chase the latest version on Botan. |
It is noteworthy that botan have different libarary name in |
ref #352, |
After this change: