Skip to content

Conversation

@loumalouomega
Copy link
Contributor

Summary

This PR adds conditional C++17 standard configuration for CUDA 13.1 and later versions to support the updated Thrust/CCCL library requirements.

Changes

  • Parse CUDA Toolkit version to detect CUDA 13.1+
  • Set CMAKE_CXX_STANDARD and CMAKE_CUDA_STANDARD to 17 when CUDA 13.1 or later is detected
  • Add version-aware message logging for C++ standard selection

Motivation

CUDA 13.1 introduced a breaking change where the bundled Thrust/CCCL library requires at least C++17. Building with the previous C++14 standard results in compilation errors:

fatal error C1189: #error:  Thrust requires at least C++17

Compatibility

  • Maintains backward compatibility with CUDA 12.x (which doesn't require C++17)
  • Only applies C++17 requirement when CUDA 13.1+ is detected
  • Works with CUDA 13.1, 13.2, and future versions

Testing

  • ✅ Successfully builds with CUDA 13.1.115 on Windows with Visual Studio 2022
  • ✅ Resolves all Thrust C++ dialect compilation errors

@loumalouomega
Copy link
Contributor Author

Anyone?¿

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant