On Wednesday 23 May 2007 09:21, Kishore, Jonnalagadda (IE10) wrote:
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> > Behalf Of Alexander Neundorf
> > Sent: Wednesday, May 23, 2007 6:00 PM
> > To: cmake@cmake.org
> > Subject: Re: [CMake] [Dev] CMake 2.5-20070519 and tool chain support
> >
> > On Wednesday 23 May 2007 00:58, Kishore, Jonnalagadda (IE10) wrote:
> > ...
> >
> > > Does this work with all types of modules? I mean for those modules
>
> that
>
> > > are automatically included like find packages, compiler settings,
> > > platform settings etc?
> >
> > Can you please explain a bit more in detail what you mean ?
> > Some files will be taken from ${CMAKE_ROOT}, no matter what
> > CMAKE_MODULE_PATH
> > is set.
>
> 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 ?

> another I would need to provide additional modules that would search for
> the installation path of IAR in their system, set the compiler options
> and flags accordingly or complain if not found.
>
> So I need two modules here that would be present in the project tree.
> FindIAR.cmake and windows-IAR.cmake. The later could also take care of
> the specific architecture requirements. I am not very sure about how it
> works currently but I would like that cmake looks into my project tree
> for those modules before (or maybe after?) it searches ${CMAKE_ROOT}.

You will need:
-a IAR.cmake which sets up the compile rules etc. for the iar compiler
-a Toolchain-Windows-IAR.cmake file to be used with -DCMAKE_TOOLCHAIN_FILE

> In such cases I also wonder on a few other things. Is it really
> necessary that the compiler setting is set in stone? It would be
> convenient if the user could start up the GUI and make a selection
> there. Can there be enumerated lists that the user can choose from? And
> if there can be dynamic changes in lists depending on other variables
> (Like toolchain options based on architecture choice). But these are
> another topic.

This is currently not possible. You can force cmake to use a special compiler 
either by setting the CC/CXX env. variables or (with cmake cvs) by using 
CMAKE_TOOLCHAIN_FILE.

See earlier emails in this thread.

Is there a definition which can be used to detect this compiler, like

#ifdef _IARCC_ 

or something like this ?

Bye
Alex
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to