I’ve read various threads in this forum, but none of them seem to actually point to a solution, so here’s my take on it.
I use the Intel C/C++ compiler for our CPU code, and nvcc for the gpu code. It’s cross-platform, Linux/Windows/Mac. I don’t build with an IDE, so I just need to know what command-line args to pass to things.
Why do I need to do this? Why not just mix cl.exe and icl.exe-compiled CPU code? On Windows, with VS2005, if I use (for instance) the thrust template lib, it uses std::string in a few places on the host side in a .cu file, and math ops such as ceil() and floor(). That host-side code gets compiled with cl.exe (Microsoft) rather than icl.exe (Intel), which causes later link errors because the Intel compiler (or its libs, such as libmmds.lib) has its own implementations of various things like _ceil and _floor.
Basically I just need a way to tell nvcc to use icl.exe rather than cl.exe (they take the same args so this should work fine). But all I can find is a way to set the compiler bin dir, not the actual name of the compiler! What am I missing? I don’t think this issue is Windows-specific, since nvcc on Linux takes the same option (–compiler-bindir), with no apparent way to set the name of the host compiler. (I found a file nvcc.profile, but as it’s undocumented I couldn’t figure out how to make it use a different host compiler.)