-
Notifications
You must be signed in to change notification settings - Fork 125
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
CMake: Fix linking with compiler other than MSVC. #104
Conversation
Previously, MSVC specific pragma comment are used to link with ws2_32 library. But those does not work with MinGW gcc and clang. Hence, use CMake's own target_link_libraries() to link with ws2_32 for Win32 platform conditionally.
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 2.8.12) | |||
# Defer enabling C and CXX languages. | |||
project(AWSLC NONE) | |||
|
|||
if(WIN32) | |||
if(MSVC) |
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 didn't understand why is this line changed, could you please clarify?
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.
Because cl.exe is Visual Studio compiler and this PR is about when not compiling with Visual Studio.
Thanks for fixing this! We currently only test Windows with MSVC and that build is passing with this change. Windows with Clang is currently untested but we're happy to take this fix now and investigate adding more Windows builds in the future. How did you test this change? If you don't mind me asking, what is your use case for AWS-LC? |
Is 'just poking around' considered as use case? 😛 |
* Allow MIT-0 license as well as Apache-2.0 and ISC * Add appropriate year range to MIT-0 license s2n-bignum original commit: awslabs/s2n-bignum@48fb153
* Allow MIT-0 license as well as Apache-2.0 and ISC * Add appropriate year range to MIT-0 license s2n-bignum original commit: awslabs/s2n-bignum@48fb153
* Allow MIT-0 license as well as Apache-2.0 and ISC * Add appropriate year range to MIT-0 license s2n-bignum original commit: awslabs/s2n-bignum@48fb153
* Allow MIT-0 license as well as Apache-2.0 and ISC * Add appropriate year range to MIT-0 license s2n-bignum original commit: awslabs/s2n-bignum@48fb153 s2n-bignum original commit: awslabs/s2n-bignum@f133bad
* Allow MIT-0 license as well as Apache-2.0 and ISC * Add appropriate year range to MIT-0 license s2n-bignum original commit: awslabs/s2n-bignum@48fb153
* Allow MIT-0 license as well as Apache-2.0 and ISC * Add appropriate year range to MIT-0 license
* Allow MIT-0 license as well as Apache-2.0 and ISC * Add appropriate year range to MIT-0 license s2n-bignum original commit: awslabs/s2n-bignum@48fb153
Previously, MSVC specific pragma comment are used to link with ws2_32 library.
But those does not work with MinGW gcc and clang. Hence, use CMake's own
target_link_libraries() to link with ws2_32 for Win32 platform conditionally.