projectchrono/chrono

Bug in FindThrust.cmake that breaks Chrono Multicore cmake build

CleConor opened this issue · 3 comments

In the actual version of Thrust (available together with CUDA Toolkit) in the version.h file, the define THRUST_VERSION has a comment in the same line and the regex that serves to bring out only the number doesn't take into account the comment.
Here is my fix:

string( REGEX REPLACE
  "#define THRUST_VERSION[ \t]+([0-9x]+)(.*)"
  "\\1"
  version
  "${version}"
)

What version of CUDA?

What version of CUDA?

12.4

I confirm this issue with CUDA 12.4. I will push a commit with the fix you suggested (thanks!) and we will look for a better overall solution to finding Thrust (from a CUDA distribution or a stand-alone Thrust installation).