From 357e7db66b898f8ee78a543712cb925e07701008 Mon Sep 17 00:00:00 2001 From: Don Bright Date: Sat, 6 Jun 2015 14:50:44 -0400 Subject: [PATCH] workaround FORTIFY_SOURCE bug where clang won't build under fedora 22 --- tests/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7fbaf5ca..5869ad51 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -500,8 +500,12 @@ foreach(CGAL3RDPLIB ${CGAL_3RD_PARTY_LIBRARIES}) endforeach() if(${CMAKE_CXX_COMPILER} MATCHES ".*clang.*" AND NOT ${CGAL_CXX_FLAGS_INIT} STREQUAL "" ) - string(REPLACE "-frounding-math" "" CGAL_CXX_FLAGS_INIT ${CGAL_CXX_FLAGS_INIT}) - string(REPLACE "--param=ssp-buffer-size=4" "" CGAL_CXX_FLAGS_INIT ${CGAL_CXX_FLAGS_INIT}) + string(REPLACE "-frounding-math" "" CGAL_CXX_FLAGS_INIT ${CGAL_CXX_FLAGS_INIT}) + string(REPLACE "--param=ssp-buffer-size=4" "" CGAL_CXX_FLAGS_INIT ${CGAL_CXX_FLAGS_INIT}) + # clang fails to build several included standard C++ libs on some + # machines when FORTIFY_SOURCE is enabled. + message(STATUS "disabling FORTIFY_SOURCE: https://bugzilla.redhat.com/show_bug.cgi?id=1188075") + string(REPLACE "FORTIFY_SOURCE=2" "FORTIFY_SOURCE=0" CGAL_CXX_FLAGS_INI$ endif() # GLib2