For platform-specific logic, either choice works, but variables are probably clearer. For compiler-specific logic, the compiler you build with might not be the same as the one the consumer is using, so that should probably be done through generator expressions if using different compilers like that is acceptable.