Hello,
is there any built-in define to tell what is the CPU and the OS at compile time or some way to make it available?
I know that there are some variables available in Lazarus: $(TargetCPU) and $(TargetOS), and I tried to use them to create a suitable define in Lazarus (it was fine for me because also when I do cmd line compile I use lazbuild). I created a custom option in the dedicated project configuration page:
"-d$(TARGET_CPU)_$(TARGET_OS)"
But the define such created is "-d_" instead of "-dx84_64_linux".
Thank you
AFTER POST ADDITION: I found a way to do this: in the Custom Options page / Conditionals, I added a line
CustomOptions += '-d' + TargetCPU + '_' + TargetOS
But I am still wondering if there is something built-in.