Regexes used to match compilers weren’t general enough to match a full path, which might be emitted by nvcc --dry-run if --compiler-bindir was used.
The logic around selecting a C++ compiler given a C compiler didn’t handle the case where a full path was used by nvcc.
In some cases, nvcc’s dry run might emit compiler paths with quotes in them. I had to add shell=True when spawning subprocesses so that these weren’t interpreted as literal executable names.
I’ve tested with passing just the compiler name to UPCXX_CUDA_NVCC (e.g. ‘nvcc’), passing an absolute path, and passing an absolute path with --compiler-bindir added.
This is a first look at addressing issue #204:
https://bitbucket.org/berkeleylab/upcxx/issues/204/no-support-for-nvcc-compiler-bindir
There were a few problems to deal with:
Regexes used to match compilers weren’t general enough to match a full path, which might be emitted by nvcc --dry-run if --compiler-bindir was used.
The logic around selecting a C++ compiler given a C compiler didn’t handle the case where a full path was used by nvcc.
In some cases, nvcc’s dry run might emit compiler paths with quotes in them. I had to add shell=True when spawning subprocesses so that these weren’t interpreted as literal executable names.
I’ve tested with passing just the compiler name to UPCXX_CUDA_NVCC (e.g. ‘nvcc’), passing an absolute path, and passing an absolute path with --compiler-bindir added.