This is a slightly misleading warning.
#pragma isn’t really ignored.
This warning is produced by the compiler which doesn’t have anything to do with it anyway, since at the time the compiler gets the code the preventing of the preprocessor-run has already taken place and the compiler has got a completely unaltered source to work with.
Since I have already answered this loads of times before it might be a better way to still execute another preprocessor which only removes this
#pragma from the source to prevent the compiler from causing this misunderstanding.