← Back to team overview

yade-users team mailing list archive

Re: [Question #266037]: CGAL ERROR: assertion violation!

 

> > Luc Sibille confirmed that the question is solved:
> > I added in the CMakeLists (thank you Timos ;-) ):
> > SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CGAL_DEFINITIONS} -DYADE_CGAL -frounding-math ")

Anton Gladky said:     (by the date of Thu, 30 Apr 2015 14:21:38 -0000)

> Question #266037 on Yade changed:
> https://answers.launchpad.net/yade/+question/266037
> Do you have a self-compiled CGAL?
> 
> Anton

I have the same error, and I have prepackaged CGAL. I am about to
commit a fix which adds -frounding-math, but only if gcc compiler is
used.

@@ -65,9 +65,9 @@ IF ("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang")
 ELSE()
   IF (GCC_VERSION VERSION_GREATER 4.9 OR GCC_VERSION VERSION_EQUAL 4.9)
     MESSAGE(STATUS "GCC Version >= 4.9. Adding -fstack-protector-strong")
-    ADD_DEFINITIONS("-fstack-protector-strong")
+    ADD_DEFINITIONS("-fstack-protector-strong -frounding-math")
   ELSE()
-    ADD_DEFINITIONS("-fstack-protector")
+    ADD_DEFINITIONS("-fstack-protector -frounding-math")
   ENDIF()
 ENDIF()


please give feedback in case of problems.

-- 
Janek Kozicki                               http://janek.kozicki.pl/  |


Follow ups

References