Hi, @Leo Purktz
As Viorel suggested, you can define Marco via script and header file.
#include <iostream>
#include"myheader.h"
int main(int argc, char* argv[])
{
#ifdef TEST
std::cout << "OK";
#else
std::cout << "FAILED";
#endif
}
Pre-build event
if exist output.txt (
echo #define TEST 1 > myheader.h
) else (
echo. > myheader.h
)
Best regards,
Minxin Yu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.