[CMake] [Dev] CMake 2.5-20070519 and tool chain support

Alexander Neundorf a.neundorf-work at gmx.net
Wed May 23 13:01:03 EDT 2007


On Wednesday 23 May 2007 12:38, kitts wrote:
> On Wednesday 23 May 2007 9:36:56 pm Alexander Neundorf wrote:
> > > OK. I recently added support for the IAR toolchain in my project. IAR
> > > is quite different when compared to GCC variants that I had used until
> > > now. IAR itself is available for multiple architectures and the
> > > difference is only in the name of the executable (An assumption
> > > there... I have only used it for two architectures).
> > >
> > > One problem I faced is that IAR's executables are not found in the PATH
> > > variables and they do not include standard libraries (and headers) when
> > > executed from the command line. So when I offer my project tree to
> >
> > Do you mean compiling a "hello world"-style program will not work because
> > it can't find the C library and because it won't find standard system
> > include files without explicitely specifying the system include
> > directories on the command line ?
>
> Yes! This is still hard for me to believe and wonder if i am missing some
> option that does the opposite of GCC's -nostdlib but i can't find it!

Maybe setting something like INCLUDE and LIBS environment variables ?

...
> And i just place them in the project folder? And pass the following
> arguments to the cmake
> command?"-DMCU=AT91RM9200
> -DCMAKE_TOOLCHAIN_FILE=./Toolchain-Windows-IAR.cmake"
>
> AT91RM9200 because there are variants within the ARM architecture and each
> requires its own specific flags.

Yes, but these flags don't change the compile rules, file name extensions or 
things like this. They are "just" additional flags. We have to figure out how 
to deal with them best.

...
> > Is there a definition which can be used to detect this compiler, like
> >
> > #ifdef _IARCC_
> >
> > or something like this ?
>
> Yes. Its __ICCARM__ for ARM and __ICCAVR__ for AVR.

Is there also a generic one without the architecture ?

Alex


More information about the CMake mailing list