einpoklum
einpoklum

Reputation: 131646

How can I dump all NVCC preprocessor defines?

I want to achieve the same effect as

gcc -dM -E - < /dev/null

(as described here) - but for nvcc. That is, I want to dump all of nvcc's preprocessor defines. Alas, nvcc doesn not support -dM. What do I do instead?

Upvotes: 6

Views: 1334

Answers (1)

dragonroot
dragonroot

Reputation: 5841

Instead of -dM, pass --compiler-options -dM to nvcc. You should also add -x cu since the compiler doesn't know the file type of stdin. So your command line would be

nvcc --compiler-options -dM -E -x cu - < /dev/null

Upvotes: 7

Related Questions