You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be convenient if there was a way for C/C++ code that is being compiled as part of a CodeQL test to know that it's part of a CodeQL test. This could be done by defining some type of macro that is defined when compiling any test, i.e. __CODEQL_TEST__.
The reason this would be useful is that I could easily compile and run this code outside of a CodeQL test without making any code modifications. Currently I am doing something like this:
And then when I want to test my code outside of CodeQL I do gcc test.c -DREAL_COMPILATION=1. This works for me, but it would be more convenient if CodeQL itself defined some macro that I could check, instead of requiring me to specify this when I compile the code manually.
The text was updated successfully, but these errors were encountered:
It would be convenient if there was a way for C/C++ code that is being compiled as part of a CodeQL test to know that it's part of a CodeQL test. This could be done by defining some type of macro that is defined when compiling any test, i.e.
__CODEQL_TEST__
.The reason this would be useful is that I could easily compile and run this code outside of a CodeQL test without making any code modifications. Currently I am doing something like this:
And then when I want to test my code outside of CodeQL I do
gcc test.c -DREAL_COMPILATION=1
. This works for me, but it would be more convenient if CodeQL itself defined some macro that I could check, instead of requiring me to specify this when I compile the code manually.The text was updated successfully, but these errors were encountered: