Created
October 15, 2022 11:16
-
-
Save Youlean/daed25b08861eed0a4b90ddd8e9559d1 to your computer and use it in GitHub Desktop.
Print Visual Studio Warning
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Required code | |
#define STRING2(x) #x | |
#define STRING(x) STRING2(x) | |
#define warning_vs(t) message(__FILE__ "(" STRING(__LINE__) "): warning: " STRING(t)) | |
// Example Usage | |
#pragma warning_vs("This is my custom warning") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment