-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
[popsift] Workaround cuda unsupported _MSC_VER is 1940 #36146
Conversation
INVALID (The correct fix involves adding |
@@ -72,6 +72,8 @@ if(NOT _CMAKE_IN_TRY_COMPILE) | |||
set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG ${VCPKG_CRT_LINK_FLAG_PREFIX}d /Z7 /Ob0 /Od /RTC1 ${VCPKG_C_FLAGS_DEBUG}" CACHE STRING "") | |||
set(CMAKE_CXX_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_CXX_FLAGS_RELEASE}" CACHE STRING "") | |||
set(CMAKE_C_FLAGS_RELEASE "${VCPKG_CRT_LINK_FLAG_PREFIX} /O2 /Oi /Gy /DNDEBUG /Z7 ${VCPKG_C_FLAGS_RELEASE}" CACHE STRING "") | |||
# Workaround cuda unsupported _MSC_VER is 1940 | |||
set(CUDA_NVCC_FLAGS "-allow-unsupported-compiler" CACHE STRING "") |
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 also required for CMAKE_CUDA_FLAGS
. But shouldn't be in the main repo as long as the internal VS version does not officially exist.
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 have tried adding '-allow-unsupported-compiler' to CMAKE_CUDA_FLAGS here, but it didn't work.
Also, I attempted to use CMAKE_CXX_COMPILER_VERSION as a control condition, but its value is empty in this file.
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.
Also, I attempted to use CMAKE_CXX_COMPILER_VERSION as a control condition, but its value is empty in this file.
That is because compiler detection runs after the toolchain not before.
I have tried adding '-allow-unsupported-compiler' to CMAKE_CUDA_FLAGS here, but it didn't work.
you probably need to have both CUDA_NVCC_FLAGS
and CMAKE_CUDA_FLAGS
. The former is for the deprecated way to use cuda via FindCUDA
while the latter is used for the case of enable_language(CUDA)
or via the LANGUAGES
defined in project()
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.
Thanks for your guidance.
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'm sorry, do you have any suggestions on how to determine the compiler version?
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.
Within vcpkg $ENV{VSCMD_VER}
can probably be used since vcpkg runs within a dev prompt
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.
Thank you for your suggestion. I tested it locally, but $ENV{VSCMD_VER}
can only display Visual Studio versions like 17.8.4, and cannot show the specific version of cl.exe
, so it still cannot be used as a condition for judgment.
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 think we should be using a custom toolchain file when testing the compiler that does this instead
Issue solved by PR #39325, |
popsift:x64-windows
failed in an internal version of Visual Studio 2022 which the _MSC_VER is 1940:SHA512s are updated for each updated downloadThe "supports" clause reflects platforms that may be fixed by this new versionAny fixed CI baseline entries are removed from that file.Any patches that are no longer applied are deleted from the port's directory../vcpkg x-add-version --all
and committing the result.