-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[ginkgo] Fix build error on x64-windows-static #35140
base: master
Are you sure you want to change the base?
Conversation
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") | ||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") |
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.
Doesn't the toolchain already care for these flag? Where do they get lost in gingko?
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.
Yes, the toolchain already care for these flag:
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
set(VCPKG_CRT_LINK_FLAG_PREFIX "/MD")
elseif(VCPKG_CRT_LINKAGE STREQUAL "static")
set(VCPKG_CRT_LINK_FLAG_PREFIX "/MT")
else()
If feature cuda
is not enabled it does not have this error, but if feature cuda is enabled it will occur, so I think it is the following code in cuda
CMakeLists that is affected.
target_compile_options(ginkgo_cuda PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:${GINKGO_CUDA_COMPILER_FLAGS}>)
target_compile_options(ginkgo_cuda PRIVATE $<$<COMPILE_LANGUAGE:CXX>:${GINKGO_COMPILER_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.
I don't know much about CUDA, but I see that it is treated as a separate language CUDA in CMake. Does the project need CMAKE_CUDA_FLAGS_<config>
?
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.
To be honest, I don’t know much about CUDA, so I can’t mislead you.
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.
It is probably not the language stuff but the CUDA link libs incl. runtime
https://github.com/ginkgo-project/ginkgo/blob/fa719901970dea8aff3925dd9fcab94fe1d46ec3/cuda/CMakeLists.txt#L126
Here we see CUDA::cudart
but it might need CUDA::cudart_static
, etc. Cf.
https://cmake.org/cmake/help/v3.20/module/FindCUDAToolkit.html?highlight=cudart#cuda-toolkit-rt-lib
I think we need to investigate the actual cause before merging. Converting the PR to draft. |
Tagging along, Generally, if you loop in upstream maintainers to these discussions, we can help resolve these issues more quickly ;) |
Fixes #35065
Fix error:
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.