[SCM] OCE packaging branch, upstream, updated. OCE-0.6.0-230-g17bea23

davyw davy.wouters at gmail.com
Fri Feb 24 18:50:46 UTC 2012


The following commit has been merged in the upstream branch:
commit 911d3be1164f4cdc34c406f8a75868963ae8ff04
Author: davyw <davy.wouters at gmail.com>
Date:   Mon Jan 16 18:34:07 2012 +0100

    Fixed bcc32 compiler option -x- for version 6.40.
    
    From version 6.40 of bcc32 it is no longer allowed to add -x- (Disable exceptions)
    options with a pragma directive. So now this option is set as a compiler
    option through cmake.

diff --git a/adm/cmake/BuildToolkit.cmake b/adm/cmake/BuildToolkit.cmake
index 6e35953..9664d1a 100644
--- a/adm/cmake/BuildToolkit.cmake
+++ b/adm/cmake/BuildToolkit.cmake
@@ -93,6 +93,24 @@ ENDIF(${PROJECT_NAME}_COMPILER_SUPPORTS_PCH AND ${PROJECT_NAME}_USE_PCH)
 
 ADD_LIBRARY(${TOOLKIT} ${${PROJECT_NAME}_LIBRARY_TYPE} ${TOOLKIT_SOURCE_FILES} ${TOOLKIT_RESOURCES} )
 
+IF(BORLAND AND BORLAND_VERSION_RS_XE2)
+	# For bcc32 compiler v6.40 and up -x- compiler option must be passed as a compiler option
+	# in stead of #pragma option -x- in code.
+	IF(TOOLKIT STREQUAL "TKOpenGl")
+		foreach(source_file ${TOOLKIT_SOURCE_FILES} )
+			if((source_file MATCHES "OpenGl_attri.cxx") OR
+			   (source_file MATCHES "OpenGl_depthcue.cxx") OR
+			   (source_file MATCHES "OpenGl_pick.cxx") OR
+			   (source_file MATCHES "OpenGl_telem_util.cxx") OR
+			   (source_file MATCHES "OpenGl_undefined.cxx") OR
+			   (source_file MATCHES "OpenGl_view.cxx"))
+				MESSAGE(STATUS "(bcc32) Disabling exceptions for ${source_file}.")
+				set_source_files_properties("${source_file}" PROPERTIES COMPILE_FLAGS "-x-")
+			endif()
+		endforeach(source_file)
+	ENDIF()
+ENDIF(BORLAND AND BORLAND_VERSION_RS_XE2)
+
 # TODO Add current toolkit header files into a source group?
 # Add target specific locations of *.lxx and *.ixx files
 IF(NOT ${PROJECT_NAME}_NO_LIBRARY_VERSION)
diff --git a/src/OpenGl/OpenGl_attri.cxx b/src/OpenGl/OpenGl_attri.cxx
index e40d6c8..e19edec 100644
--- a/src/OpenGl/OpenGl_attri.cxx
+++ b/src/OpenGl/OpenGl_attri.cxx
@@ -81,10 +81,11 @@ used in immediat mode context.
 /*#define BUC60918*/        /*GG CADPAK_V2/RINA Enable transparency using Zbuffer
                             */
 
-/* Workaround for internal bcc32 compiler bug? */						
-#ifdef __BORLANDC__
+/* Workaround for internal bcc32 compiler bug. */						
+/* Starting from bcc32 v6.40 this flag should be passed as a compiler option. */
+#if defined(__BORLANDC__) && __BORLANDC__ < 0x0640 /* bcc32 v6.40 */
 #pragma option -x-
-#endif						
+#endif
 	
 /*----------------------------------------------------------------------*/
 /*
diff --git a/src/OpenGl/OpenGl_depthcue.cxx b/src/OpenGl/OpenGl_depthcue.cxx
index 5f3b131..6e89a86 100644
--- a/src/OpenGl/OpenGl_depthcue.cxx
+++ b/src/OpenGl/OpenGl_depthcue.cxx
@@ -18,8 +18,9 @@ xx-xx-xx : xxx ; Creation.
 
 ************************************************************************/
 
-/* Workaround for internal bcc32 compiler bug? */						
-#ifdef __BORLANDC__
+/* Workaround for internal bcc32 compiler bug. */						
+/* Starting from bcc32 v6.40 this flag should be passed as a compiler option. */
+#if defined(__BORLANDC__) && __BORLANDC__ < 0x0640 /* bcc32 v6.40 */
 #pragma option -x-
 #endif
 
diff --git a/src/OpenGl/OpenGl_pick.cxx b/src/OpenGl/OpenGl_pick.cxx
index 1162e41..bb5ef64 100644
--- a/src/OpenGl/OpenGl_pick.cxx
+++ b/src/OpenGl/OpenGl_pick.cxx
@@ -16,10 +16,11 @@ xx-xx-xx : xxx ; Creation.
 
 ************************************************************************/
 
-/* Workaround for internal bcc32 compiler bug? */						
-#ifdef __BORLANDC__
+/* Workaround for internal bcc32 compiler bug. */						
+/* Starting from bcc32 v6.40 this flag should be passed as a compiler option. */
+#if defined(__BORLANDC__) && __BORLANDC__ < 0x0640 /* bcc32 v6.40 */
 #pragma option -x-
-#endif						
+#endif					
 
 /*----------------------------------------------------------------------*/
 /*
diff --git a/src/OpenGl/OpenGl_telem_util.cxx b/src/OpenGl/OpenGl_telem_util.cxx
index fb26b62..c308a9a 100644
--- a/src/OpenGl/OpenGl_telem_util.cxx
+++ b/src/OpenGl/OpenGl_telem_util.cxx
@@ -53,10 +53,11 @@ when a face has confused or aligned points.
 */
 #define QTOCC_PATCH
 
-/* Workaround for internal bcc32 compiler bug? */						
-#ifdef __BORLANDC__
+/* Workaround for internal bcc32 compiler bug. */						
+/* Starting from bcc32 v6.40 this flag should be passed as a compiler option. */
+#if defined(__BORLANDC__) && __BORLANDC__ < 0x0640 /* bcc32 v6.40 */
 #pragma option -x-
-#endif						
+#endif				
 
 /*----------------------------------------------------------------------*/
 /*
diff --git a/src/OpenGl/OpenGl_undefined.cxx b/src/OpenGl/OpenGl_undefined.cxx
index dccb6a5..55ca90d 100644
--- a/src/OpenGl/OpenGl_undefined.cxx
+++ b/src/OpenGl/OpenGl_undefined.cxx
@@ -25,10 +25,11 @@ Suppression call_tox_set_colormap_mapping()
 
 ************************************************************************/
 
-/* Workaround for internal bcc32 compiler bug? */						
-#ifdef __BORLANDC__
+/* Workaround for internal bcc32 compiler bug. */						
+/* Starting from bcc32 v6.40 this flag should be passed as a compiler option. */
+#if defined(__BORLANDC__) && __BORLANDC__ < 0x0640 /* bcc32 v6.40 */
 #pragma option -x-
-#endif						
+#endif					
 
 /*----------------------------------------------------------------------*/
 /*
diff --git a/src/OpenGl/OpenGl_view.cxx b/src/OpenGl/OpenGl_view.cxx
index 67044e2..3b52e3d 100644
--- a/src/OpenGl/OpenGl_view.cxx
+++ b/src/OpenGl/OpenGl_view.cxx
@@ -64,10 +64,11 @@ from higher API */
 if any was defined
 */
 
-/* Workaround for internal bcc32 compiler bug? */						
-#ifdef __BORLANDC__
+/* Workaround for internal bcc32 compiler bug. */						
+/* Starting from bcc32 v6.40 this flag should be passed as a compiler option. */
+#if defined(__BORLANDC__) && __BORLANDC__ < 0x0640 /* bcc32 v6.40 */
 #pragma option -x-
-#endif						
+#endif					
 
 /*----------------------------------------------------------------------*/
 /*
diff --git a/src/ShapeFix/ShapeFix_ComposeShell.cxx b/src/ShapeFix/ShapeFix_ComposeShell.cxx
index 4678fb2..2fbf829 100644
--- a/src/ShapeFix/ShapeFix_ComposeShell.cxx
+++ b/src/ShapeFix/ShapeFix_ComposeShell.cxx
@@ -6,7 +6,8 @@
 //    abv  22.07.99 implementing patch indices
 //    svv  10.01.00 porting on DEC
 
-#ifdef __BORLANDC__
+/* Starting from bcc32 v6.40 this flag should be passed as a compiler option. */
+#if defined(__BORLANDC__) && __BORLANDC__ < 0x0640 /* bcc32 v6.40 */
 #pragma option -x-
 #endif
 

-- 
OCE packaging



More information about the debian-science-commits mailing list