Revision: 54123
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54123&view=rev
Author:   caen23
Date:     2012-12-28 20:47:40 +0000 (Fri, 28 Dec 2012)
Log Message:
-----------
Remove #pragma directive and add a warning suppression flag when compiling with 
Clang. #pragma caused GCC to fail

Modified Paths:
--------------
    brlcad/trunk/include/bu.h
    brlcad/trunk/misc/CMake/CompilerFlags.cmake

Modified: brlcad/trunk/include/bu.h
===================================================================
--- brlcad/trunk/include/bu.h   2012-12-28 19:03:54 UTC (rev 54122)
+++ brlcad/trunk/include/bu.h   2012-12-28 20:47:40 UTC (rev 54123)
@@ -2094,7 +2094,6 @@
 #  define bu_offsetof(_t, _m) (size_t)(&(((_t *)0)->_m))
 #  define bu_offsetofarray(_t, _m) (size_t)((((_t *)0)->_m))
 #else
-#  pragma clang diagnostic ignored "-Wextended-offsetof"
 #  define bu_offsetof(_t, _m) (size_t)offsetof(_t, _m)
 #  define bu_offsetofarray(_t, _m) (size_t)offsetof(_t, _m[0])
 #endif

Modified: brlcad/trunk/misc/CMake/CompilerFlags.cmake
===================================================================
--- brlcad/trunk/misc/CMake/CompilerFlags.cmake 2012-12-28 19:03:54 UTC (rev 
54122)
+++ brlcad/trunk/misc/CMake/CompilerFlags.cmake 2012-12-28 20:47:40 UTC (rev 
54123)
@@ -370,6 +370,11 @@
   ADD_NEW_FLAG(EXE_LINKER SDK_FLAG ALL)
 endif(APPLE)
 
+if(CMAKE_C_COMPILER_ID MATCHES "Clang")
+  BRLCAD_CHECK_C_FLAG("Wno-extended-offsetof")
+  BRLCAD_CHECK_CXX_FLAG("Wno-extended-offsetof")
+endif(CMAKE_C_COMPILER_ID MATCHES "Clang")
+
 # Local Variables:
 # tab-width: 8
 # mode: cmake

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to