[Insight-developers] itk's CMakeLists.txt and Mac compiler flags (BUG: 6267)

Bill Lorensen bill.lorensen at gmail.com
Tue Feb 12 11:21:42 EST 2008


Sean,

I have a solution I think. I'm still testing it. It basically uses
TRY_COMPILE and searches the output for strings that indicate bad flags for
various compilers. I'll keep you posted and eventually ask you to test it on
the MAC.

I'm cc'ing the developer's list.

Bill

On Mon, Feb 11, 2008 at 2:38 PM, Bill Lorensen <bill.lorensen at gmail.com>
wrote:

> Guys,
>
> It seems that the CheckCXXCompilerFlag.cmake macro is not a correct
> implementation. At least for gcc. I have passed in arguments like:
> -xyzzy (return status = 0)  c++: language yzzy not recognized
> -ananana (return status = 1)  cc1plus: error: unrecognized command line
> option "-ananana"
> and of course -no-cpp-precomp (status=0) c++: unrecognized option
> '-no-cpp-precomp'
>
> However, they all output something to standard error.
>
> I guess we could check the output of TRY_COMPILE for "unrecognized" or
> "not recognized" and maybe some other strings.
>
> Bill, should we elevate this to the cmake list since this macro was
> written by the KDE folks?
>
> Bill
>
>
>
> On Mon, Feb 11, 2008 at 1:43 PM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>
> > I just added a note with the CMakeOutput.log output.
> >
> > I just ran c++ by hand. Here is what I get:
> >
> > [lorensen at localhost foo]$ c++ -c -no-cpp-precomp foo.cxx
> > c++: unrecognized option '-no-cpp-precomp'
> > [lorensen at localhost foo]$ echo $status
> > 0
> > [lorensen at localhost foo]$ c++ -c -ananan foo.cxx
> > cc1plus: error: unrecognized command line option "-ananan"
> > [lorensen at localhost foo]$ echo $status
> > 1
> > [lorensen at localhost foo]$
> >
> >
> >
> > On Sun, Feb 10, 2008 at 8:46 AM, Bill Lorensen <bill.lorensen at gmail.com>
> > wrote:
> >
> > > Bill,
> > >
> > > Thanks. Looks like we can probably use CheckCXXCompilerFlag.cmake.
> > >
> > > Bill
> > >
> > > On Sat, Feb 9, 2008 at 11:57 PM, Bill Hoffman <
> > > bill.hoffman at kitware.com> wrote:
> > >
> > > >  Bill Lorensen wrote:
> > > > > Bill,
> > > > >
> > > > > Can you look at this bug report:
> > > > > http://public.kitware.com/Bug/view.php?id=6267
> > > > >
> > > > > The cvs log shows that you made these changes. Do you recall why
> > > > they
> > > > > were made? It was only about 5 years ago...
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Bill
> > > > I have added a note to the bug...
> > > >
> > > > -Bill
> > > >
> > > >
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20080212/8da1ca8f/attachment.html


More information about the Insight-developers mailing list