-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[openssl] Don't switch from jom to nmake, fix cflags #23726
Conversation
ports/openssl/unix/CMakeLists.txt
Outdated
set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BUILD_TYPE}}") | ||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||
set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") |
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.
set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BUILD_TYPE}}") | |
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | |
set(CFLAGS "-Wno-error=unused-command-line-argument ${CMAKE_C_FLAGS}") | |
set(CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${BUILD_TYPE}}") | |
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | |
set(CFLAGS "${CFLAGS} -Wno-error=unused-command-line-argument") |
Otherwise the CFLAGS
value above will be clobbered if the compiler is Clang (like when building for Android, for example).
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 see. And for consistency, we should also switch to CMAKE_C_COMPILER_ID
. (?)
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.
FTR CMAKE_CXX_COMPILER_ID
was never initialized because of project(openssl C)
...
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.
Oh, that's a very good catch - yes, we should definitely be using CMAKE_C_COMPILER_ID
.
Thanks @dg0yt! |
What does your PR fix?
Avoids change of the build tool during the build process, and consistently uses
VCPKG_CONCURRENCY
. Cf. OpenSSL (1.1.1l#4) build failure #22101 (comment).Passes per-build-type cflags on
UNIX
. Resolves [openssl] respect build configuration when building for unix #23700.Activates
-Wno-error=unused-command-line-argument
for clang. Cf. [openssl] Don't switch from jom to nmake, fix cflags #23726 (comment).Which triplets are supported/not supported? Have you updated the CI baseline?
unchanged, no
Does your PR follow the maintainer guide?
yes
If you have added/updated a port: Have you run
./vcpkg x-add-version --all
and committed the result?yes