Detect compiler with #ifdef

前端 未结 3 1187
南笙
南笙 2020-12-10 15:27

I\'m trying to build a small code that works across multiple platforms and compilers. I use assertions, most of which can be turned off, but when compiling with PGI\'s

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-10 16:09

    You could try this to see what macros are predefined by the compiler:

    pgcc -dM
    

    Maybe that will reveal a suitable macro you can use.

提交回复
热议问题