-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Build system: _ITERATOR_DEBUG_LEVEL not respected in cuda test on MSVC #1460
Comments
Could you submit a PR to fix/workaround this? |
Sadly not, I have no understanding of this cuda test, and I'm not experienced with cuda or why cmake may not pass compiler flags to it. I was able to make a small patch that makes cuda tests optional with a cmake option. Is that interesting? |
@emmenlau |
it's a bit wierd but with my experience, linking issue can come from build with Debug or RelWithDebInfo with nvcc... I will take a look and report here ASAP. |
@emmenlau I'd like to know how Please let us know both your environment and configuration. Opinion about the source of this issueI usually met
With the description of @emmenlau, I assumed the project structure is peering 'fmt' and 'xtensor'.
If this is right, 2-1 case shouldn't matter when the command is like ...
Possible Fix?I'm planning to change the Or some generator expression can be used. # test/cuda-test/CMakeLists.txt
list(APPEND CUDA_NVCC_FLAGS "--verbose")
list(APPEND CUDA_NVCC_FLAGS_DEBUG "-g" "-O0")
list(APPEND CUDA_NVCC_FLAGS_RELEASE "-O3")
list(APPEND CUDA_NVCC_FLAGS_MINSIZEREL "-O1")
list(APPEND CUDA_NVCC_FLAGS_RELWITHDEBINFO "-g" "-O2")
if(...)
set_property(SOURCE cuda-cpp14.cu
APPEND PROPERTY
COMPILE_OPTIONS "${CUDA_NVCC_FLAGS}" "${CUDA_NVCC_FLAGS_MINSIZEREL}"
)
endif() Currently checking known flags of NVCC. I think the work won't require many changes. |
Made |
In order to build c++ against https://github.com/xtensor-stack/xtensor, it is required to set the
_ITERATOR_DEBUG_LEVEL=0
on MSVC. We use the following environment variable for cmake to set this:This setting is slightly cumbersome because it has to match in each and every source file of the project. Generally that works well with many projects, including
fmt
. However the current fmt CUDA test does not respect the setting, which in turn leads to a build failure because not all files use the same setting:The text was updated successfully, but these errors were encountered: