build - How to locate a compiler in a path with a version number in it? -
I am trying to design a scanstate file for an embedded system project. On my machine, the compiler is on "C: \ Program Files \ IAR Systems \ Embedded Workbench 5.4 \ arm \ bin", I have to create a build system to try toolback, even if another version of Embedded Workbench is installed , Or if the user has chosen to install it somewhere else.
I would also be interested in the strategy used in makefile or ant files as they are also useful here.
What are some strategies to do this? Do I have other options than searching the Windows Registry or "C: \ Program Files \ IAR System \ Embedded Workbench * * Hand \ Bin"?
The easiest solution is to use an environment variable you still have to manually It has to be set, but build system is only required for environment variables, so it can be normal for all build hosts.
For example, your case may be:
EWBARM_V0504 = "C: \ Program Files \ IAR System \ Embedded Workbench 5.4 \ Hand \ Bin"
And other versions, and then you will use% EWBARM_V0504% in place of the path you would use in your build system if the variable is not present, the build will fail, which will use the wrong compiler Better, and easily fixed.
Comments
Post a Comment