Skip to content

Commit

Permalink
Minor updates for OpenCascade 6.7.1 on Windows.
Browse files Browse the repository at this point in the history
All changes will be compatible with older versions on other systems.
Refs #9479
  • Loading branch information
martyngigg committed May 19, 2014
1 parent f4171b8 commit 6e41e06
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 55 deletions.
7 changes: 7 additions & 0 deletions Code/Mantid/Build/CMake/FindOpenCascade.cmake
Expand Up @@ -60,6 +60,10 @@ find_library ( OPENCASCADE_LIB_TKGEOMBASE
NAMES TKGeomBase
)

find_library ( OPENCASCADE_LIB_TKGEOMAlgo
NAMES TKGeomAlgo
)

set ( OPENCASCADE_LIBRARIES
${OPENCASCADE_LIB_TKERNEL}
${OPENCASCADE_LIB_TKBO}
Expand All @@ -71,6 +75,7 @@ set ( OPENCASCADE_LIBRARIES
${OPENCASCADE_LIB_TKG2D}
${OPENCASCADE_LIB_TKG3D}
${OPENCASCADE_LIB_TKGEOMBASE}
${OPENCASCADE_LIB_TKGEOMALGO}
)

# handle the QUIETLY and REQUIRED arguments and set OPENCASCADE_FOUND to TRUE if
Expand All @@ -83,4 +88,6 @@ mark_as_advanced ( OPENCASCADE_INCLUDE_DIR
OPENCASCADE_LIB_TKPRIM OPENCASCADE_LIB_TKMESH
OPENCASCADE_LIB_TKBREP OPENCASCADE_LIB_TKTOPALGO
OPENCASCADE_LIB_TKMATH OPENCASCADE_LIB_TKG2D
OPENCASCADE_LIB_TKG3D OPENCASCADE_LIB_TKGEOMBASE
OPENCASCADE_LIB_TKGEOMALGO
)
2 changes: 0 additions & 2 deletions Code/Mantid/Framework/Geometry/CMakeLists.txt
@@ -1,5 +1,4 @@
set ( SRC_FILES
${SRC_FILES} ${OPENCASCADE_SRC}
src/ComponentParser.cpp
src/Crystal/ConventionalCell.cpp
src/Crystal/IndexingUtils.cpp
Expand Down Expand Up @@ -184,7 +183,6 @@ set ( INC_FILES
inc/MantidGeometry/Rendering/OCGeometryGenerator.h
inc/MantidGeometry/Rendering/OCGeometryHandler.h
inc/MantidGeometry/Rendering/OCGeometryRenderer.h
inc/MantidGeometry/Rendering/OpenCascadeConfig.h
inc/MantidGeometry/Rendering/OpenGL_Headers.h
inc/MantidGeometry/Rendering/vtkGeometryCacheReader.h
inc/MantidGeometry/Rendering/vtkGeometryCacheWriter.h
Expand Down

This file was deleted.

@@ -1,11 +1,4 @@
#include "MantidGeometry/Rendering/OCGeometryGenerator.h"
#include "MantidKernel/Logger.h"
#include "MantidKernel/WarningSuppressions.h"
#include <vector>
#include <cmath>
#include <climits> // Needed for g++4.4 on Mac with OpenCASCADE 6.3.0
#include "MantidKernel/V3D.h"
#include "MantidKernel/Matrix.h"
#include "MantidGeometry/Objects/Object.h"
#include "MantidGeometry/Surfaces/Quadratic.h"
#include "MantidGeometry/Surfaces/Sphere.h"
Expand All @@ -14,13 +7,28 @@
#include "MantidGeometry/Surfaces/Plane.h"
#include "MantidGeometry/Surfaces/Torus.h"
#include "MantidGeometry/Objects/Rules.h"
#include "MantidKernel/Logger.h"
#include "MantidKernel/Matrix.h"
#include "MantidKernel/V3D.h"
#include "MantidKernel/WarningSuppressions.h"
#include <climits> // Needed for g++4.4 on Mac with OpenCASCADE 6.3.0
#include <cmath>
#include <vector>

// Squash a warning coming out of an OpenCascade header
#ifdef __INTEL_COMPILER
#pragma warning disable 191
#endif
// Opencascade defines _USE_MATH_DEFINES without checking whether it is already used.
// Undefine it here before we include the headers to avoid a warning. Older versions
// also define M_SQRT1_2 so do the same if it is already defined
#ifdef _MSC_VER
#undef _USE_MATH_DEFINES
#ifdef M_SQRT1_2
#undef M_SQRT1_2
#endif
#endif

#include "MantidGeometry/Rendering/OpenCascadeConfig.h"
GCC_DIAG_OFF(conversion)
#include <gp_Trsf.hxx>
GCC_DIAG_ON(conversion)
Expand Down
Expand Up @@ -10,7 +10,16 @@
#ifdef __INTEL_COMPILER
#pragma warning disable 191
#endif
#include "MantidGeometry/Rendering/OpenCascadeConfig.h"
// Opencascade defines _USE_MATH_DEFINES without checking whether it is already used.
// Undefine it here before we include the headers to avoid a warning
#ifdef _MSC_VER
#undef _USE_MATH_DEFINES
#ifdef M_SQRT1_2
#undef M_SQRT1_2
#endif
#endif


GCC_DIAG_OFF(conversion)
#include <gp_Pnt.hxx>
GCC_DIAG_ON(conversion)
Expand Down

0 comments on commit 6e41e06

Please sign in to comment.