compiler options dynamic output exectuable file

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Bitblazer
Enthusiast
Enthusiast
Posts: 736
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

compiler options dynamic output exectuable file

Post by Bitblazer »

The Compiler Options can be used for both 32bit and 64bit compilation. For some projects that is pretty useful where 32bit still makes sense. So for some tools, i simply open Both IDE's and produce a 32bit version and a 64bit version. The compiler options between both IDE versions are shared and in one case thats annoying - the output file will therefore be overwriten by the second compilation. Currently i manually change the output options (for example) to create a "checksome32.exe" and a "checksome64.exe" binary and the only field i need to constantly edit for each compilation and each tool, is the output executable field. Otherwise one version overwrites the other.
This could be solved in different ways. Either simply by having 2 entries in the compiler options dialogue and having one of them disabled depending on the current version, or by allowing the use of a compiler directive inside the "output executable" field of the "compile options" settings.

For example - introduce a "compiler directive" like "#PB_Compiler_CPUPlatform" similar to "#PB_Compiler_Processor" and allow its use in the "compiler->compiler options->output executable" field like "checksome#PB_Compiler_Architecture" which would create a "checksomex86.exe" during a 32bit IDE compilation and a "checksomex64.exe" file for the 64bit IDE. That would simplify the compilation process for multiple binary target platforms.
User avatar
HeX0R
Addict
Addict
Posts: 992
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: compiler options dynamic output exectuable file

Post by HeX0R »

Just create a project with two targets, one for x86 and one for x64 and you can set individual compiler settings.
Post Reply