Description: Link with -latomic on mipsel.
Author: Joachim Reichel <reichel@debian.org>

Index: cgal/cmake/modules/CGAL_SetupCGALDependencies.cmake
===================================================================
--- cgal.orig/cmake/modules/CGAL_SetupCGALDependencies.cmake
+++ cgal/cmake/modules/CGAL_SetupCGALDependencies.cmake
@@ -145,6 +145,10 @@ function(CGAL_setup_CGAL_flags target)
       message( STATUS "Using gcc version 4 or later. Adding -frounding-math" )
       target_compile_options(${target} INTERFACE "$<$<COMPILE_LANGUAGE:CXX>:-frounding-math>")
     endif()
+    if ( "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "mips" )
+      message( STATUS "Using gcc on mips. Adding -latomic" )
+      target_link_options( ${target} INTERFACE "-Wl,--push-state,--no-as-needed,-latomic,--pop-state" )
+   endif()
   endif()
 
   if (CGAL_DO_NOT_USE_BOOST_MP)
