[CMake] try_compile generates assertion failure in MSVC 2010

Dominik Szczerba dominik at itis.ethz.ch
Fri Feb 4 11:39:18 EST 2011


Hmmm, there IS still something cmake related...
If I just ADD_EXECUTABLE on my configure file, and add its building
and execution as a depedance to building my library
(add_custom_target, add_dependencies), it will compile and run with no
crash... (only each time, which should not be the case for efficiency)
I am passing my CMAKE_CXX_FLAGS to try_compile, what else can make a
difference to add_executable?

Dominik

On Fri, Feb 4, 2011 at 4:23 PM, Dominik Szczerba <dominik at itis.ethz.ch> wrote:
> Many thanks for your feedback. Update:
>
> - the proposed compiler switches do not solve the issue. Neither does /fp:strict
> - bluntly ignoring the failing assertion (need to click twice) seems
> to still produce some output. A bit scary though, no idea if the
> numbers can be trusted...
> - Indeed, the underlying problem is related to the exact predicates I
> need to use (Shewchuk & co). As can be found in google, to force
> double (and not extended) precision one needs:
>
> fpu_init = _controlfp (0, 0), _controlfp (_PC_53, MCW_PC)
>
> // do my fp computations to calculate various epsilons
>
> _controlfp (fpu_init, 0xfffff)
>
> So this clearly goes beyond cmake now, but of course if you have any
> more ideas you are more than welcome to share them...
>
> Regards,
> Dominik
>


More information about the CMake mailing list