[CMake] Version 2.8 affects exception handling?

Bill Spotz wfspotz at sandia.gov
Sun Nov 29 00:18:07 EST 2009


> On Nov 28, 2009, at 11:40 AM, Bill Hoffman wrote:
>
>> This is from these two bugs:
>>
>> http://public.kitware.com/Bug/view.php?id=9959
>> http://public.kitware.com/Bug/view.php?id=6195
>>
>> If the user does not specify a deployment target, CMake should not  
>> use
>> one.  As a rule we try to keep CMake as default as possible.   gcc -o
>> foo foo.c should be the same as add_executable(foo foo.c).  In this
>> case
>> that is not true...   Will come up with a fix for 2.8.1.   As a work
>> around, I think if you do this set(CMAKE_OSX_DEPLOYMENT_TARGET "") it
>> should stop CMake from adding the flag.
>
>
> So set(CMAKE_OSX_DEPLOYMENT_TARGET "") doesn't seem to work: I am
> still getting the -mmacosx-version-min=10.5 compiler options.  I'm
> still not sure why this would cause the problems I am seeing, which
> are exceptions not getting caught.
>
> I have constructed a smaller build, which makes it easier to find all
> of the differences.  I have also found linker options
>
>     -L/sw/lib/gcc4.4/lib/gcc/i686-apple-darwin9/4.4.1
>     -L/sw/lib/gcc4.4/lib
>     -lgfortranbegin
>     -lgfortran
>
> when the epetra dynamic library gets linked under the new cmake and
> not the old.  This could be problematic because it is using the
> compiler /usr/bin/c++, which on my system is version 4.0.1 (although
> the gfortran compiler is version 4.4.1).


So I have been able to confirm that it is these fortran-related link  
options that are causing my problem.  I'm not exactly sure what to  
make of the fact that it links and runs properly without them, but  
links and runs improperly with them.

** Bill Spotz                                              **
** Sandia National Laboratories  Voice: (505)845-0170      **
** P.O. Box 5800                 Fax:   (505)284-0154      **
** Albuquerque, NM 87185-0370    Email: wfspotz at sandia.gov **








More information about the CMake mailing list