Errors compiling optix-toolkit

I am having trouble compiling the optix-toolkit available here:

I have the HPC SDK 25.3 and OptiX 9.0 - I am able to compile OptiX itself and run the examples.

I get errors like the following when trying to compile the toolkit -
/opt/nvidia/hpc_sdk/Linux_x86_64/2025/compilers/include/x86intrin.h:25:2: error: #error “<x86intrin.h> is not supported by this compiler.”
25 | #error “<x86intrin.h> is not supported by this compiler.”
| ^~~~~

I think this is because the toolkit itself needs the NVIDIA compilers, but the dependencies like Imath etc use gcc, which cannot use the include files from the NVIDIA compiler. I have tried various approaches unsuccessfully, so I am not sure how to resolve this.

Thanks in advance, I am happy to provide additional information as necessary.