Commit 75b8e16b authored by cyrush's avatar cyrush

merge boost cmake changes from trunk

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@25708 18c085ea-50e0-402c-830e-de6fd14e8384
parent bb171c1d
......@@ -85,6 +85,9 @@
# these are now available in VisItMacros.cmake, and can be used without
# re-write. Include VisItMacros.cmake.
#
# Cyrus Harrison, Tue Feb 10 20:06:07 PST 2015
# Changed boost support.
#
#****************************************************************************/
##
......@@ -178,7 +181,7 @@ SET(EAVL_INCLUDE_DIR @EAVL_INCLUDE_DIR@)
SET(EAVL_LIBRARY_DIR @EAVL_LIBRARY_DIR@)
# Set up BOOST
SET(BOOST_INCLUDE_DIR ${VISIT_INCLUDE_DIR}/visit/third_party_builtin/bilib/boost_1_42_0)
SET(BOOST_INCLUDE_DIR @BOOST_INCLUDE_DIR@)
# Set up Qt
SET(QT_INCLUDE_DIR ${VISIT_INCLUDE_DIR}/qt/include)
......
......@@ -380,6 +380,9 @@
# Kathleen Biagas, Wed Oct 22 16:31:49 MST 2014
# Always use -DNOMINMAX on Windows.
#
# Cyrus Harrison, Tue Feb 10 20:06:07 PST 2015
# Change boost support.
#
#****************************************************************************/
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
......@@ -1034,63 +1037,6 @@ IF(BOOST_FOUND)
SET(HAVE_BOOST 1)
ENDIF(BOOST_FOUND)
#IF(VISIT_USE_BOOST)
# INCLUDE(${CMAKE_ROOT}/Modules/FindBoost.cmake)
#ENDIF(VISIT_USE_BOOST)
# Cmake's FindBoost sets Boost_VERSION whereas
# VisIt's FindVisItBoost's sets BOOST_VERSION.
# As such, copy over from one to the other. However, we use
# SET_APP_VERSION in the site-config file which does all that so
# none of this code is needed any more.
#SET(Boost_VERSION ${BOOST_VERSION})
# Set the boost directory if requested otherwise use the visit built in.
#IF(Boost_VERSION)
# MESSAGE(STATUS " Boost_VERSION=${Boost_VERSION}")
# # FindBoost.cmake does not always properly set the major, minor
# # and subminor versions correctly, so do that ourselves.
# STRING(REPLACE "." "0" Boost_VERSION_NUMERIC "${Boost_VERSION}")
# SET(Boost_MAJOR_VERSION 0)
# SET(Boost_MINOR_VERSION 0)
# SET(Boost_SUBMINOR_VERSION 0)
# IF(NOT "${Boost_VERSION_NUMERIC}" STREQUAL "0")
# MATH(EXPR Boost_MAJOR_VERSION "${Boost_VERSION_NUMERIC} / 100000")
# MATH(EXPR Boost_MINOR_VERSION "${Boost_VERSION_NUMERIC} / 100 % 1000")
# MATH(EXPR Boost_SUBMINOR_VERSION "${Boost_VERSION_NUMERIC} % 100")
# ENDIF(NOT "${Boost_VERSION_NUMERIC}" STREQUAL "0")
# MESSAGE(STATUS " Boost_MAJOR_VERSION=${Boost_MAJOR_VERSION}")
# MESSAGE(STATUS " Boost_MINOR_VERSION=${Boost_MINOR_VERSION}")
# MESSAGE(STATUS " Boost_SUBMINOR_VERSION=${Boost_SUBMINOR_VERSION}")
# SET(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIR} CACHE PATH "Path to boost lib")
#ELSE(Boost_VERSION)
# SET(BOOST_INCLUDE_DIR ${VISIT_SOURCE_DIR}/third_party_builtin/bilib/boost_1_42_0 CACHE PATH "Path to boost lib")
#ENDIF(Boost_VERSION)
# TEMPORARY CODE INCASE SOMEONE DOES NOT BUILD BOOST SO THAT CODE THAT
# USES BOOST BUT DOES NOT HAVE THE WRAPPER LIKE WE HAVE FOR PARADIS
# WILL STILL COMPILE.
# Set the boost directory if requested otherwise use the visit built in.
IF(NOT BOOST_INCLUDE_DIR)
SET(BOOST_INCLUDE_DIR ${VISIT_SOURCE_DIR}/third_party_builtin/bilib/boost_1_42_0 CACHE PATH "Path to boost lib")
ENDIF(NOT BOOST_INCLUDE_DIR)
# Set BOOST_USABLE_PARADIS if boost 1.36.0 or later is found. ParaDIS
# uses make_shared, which was only introduced in boost 1.36.0.
IF(VISIT_PARADIS)
IF(BOOST_MAJOR_VERSION GREATER 0 AND BOOST_MINOR_VERSION GREATER 35)
SET(BOOST_USABLE_PARADIS 1)
MESSAGE(STATUS " Boost usable by paraDIS")
ELSE(BOOST_MAJOR_VERSION GREATER 0 AND BOOST_MINOR_VERSION GREATER 35)
MESSAGE(STATUS " Boost was not found or is not usable by paraDIS")
ENDIF(BOOST_MAJOR_VERSION GREATER 0 AND BOOST_MINOR_VERSION GREATER 35)
ENDIF(VISIT_PARADIS)
IF( (VISIT_PYTHON_SCRIPTING OR VISIT_PYTHON_FILTERS) AND NOT VISIT_DBIO_ONLY)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/FindVisItPython.cmake)
......
......@@ -189,6 +189,9 @@ using std::map;
// Brad Whitlock, Wed Jan 4 16:52:54 PST 2012
// Add missingDataBehavior.
//
// Cyrus Harrison, Mon Jan 26 21:26:34 PST 2015
// Changed check from boost interval template lib to boost proper.
//
// ****************************************************************************
avtDataRequest::avtDataRequest(const char *var, int ts,
......@@ -224,7 +227,7 @@ avtDataRequest::avtDataRequest(const char *var, int ts,
needNativePrecision = false;
discTol = 0.01;
flatTol = 0.05;
#ifdef HAVE_BILIB
#ifdef HAVE_BOOST
discMode = 1; // adaptive
#else
discMode = 0; // uniform
......@@ -1683,13 +1686,17 @@ avtDataRequest::GetAdmissibleDataTypes() const
// Mark C. Miller, Wed Mar 3 07:59:15 PST 2010
// Changed form of conditional compilation check for HAVE_BILIB from
// numeric test to existence test.
//
// Cyrus Harrison, Mon Jan 26 21:26:34 PST 2015
// Changed check from boost interval template lib to boost proper.
//
// ****************************************************************************
void
avtDataRequest::SetDiscMode(int mode)
{
discMode = mode;
#ifndef HAVE_BILIB
#ifndef HAVE_BOOST
if (discMode == 1) // Adaptive
{
debug1 << "Adaptive not available. "
......
This diff is collapsed.
......@@ -145,6 +145,10 @@ QvisMeshManagementWindow::~QvisMeshManagementWindow()
// Mark C. Miller, Wed Mar 3 07:59:15 PST 2010
// Changed form of conditional compilation check for HAVE_BILIB from
// numeric test to existence test.
//
// Cyrus Harrison, Mon Jan 26 21:26:34 PST 2015
// Changed check from boost interval template lib to boost proper.
//
// ****************************************************************************
void
......@@ -189,7 +193,7 @@ QvisMeshManagementWindow::CreateWindowContents()
layoutCSGGroup->addWidget(discretizeUniform, 2, 1);
discretizeAdaptive = new QRadioButton(tr("Adaptive"), pageCSGGroup);
discretizationMode->addButton(discretizeAdaptive,1);
#ifndef HAVE_BILIB
#ifndef HAVE_BOOST
discretizeAdaptive->setEnabled(false);
#endif
layoutCSGGroup->addWidget(discretizeAdaptive, 2, 2);
......@@ -255,6 +259,10 @@ QvisMeshManagementWindow::CreateWindowContents()
// Mark C. Miller, Wed Mar 3 07:59:15 PST 2010
// Changed form of conditional compilation check for HAVE_BILIB from
// numeric test to existence test.
//
// Cyrus Harrison, Mon Jan 26 21:26:34 PST 2015
// Changed check from boost interval template lib to boost proper.
//
// ****************************************************************************
void
......@@ -301,7 +309,7 @@ QvisMeshManagementWindow::UpdateWindow(bool doAll)
}
else if (dMode == MeshManagementAttributes::Adaptive)
{
#ifdef HAVE_BILIB
#ifdef HAVE_BOOST
discretizationMode->button(1)->setChecked(true);
flatEnoughLineEdit->setEnabled(true);
#else
......@@ -512,7 +520,7 @@ QvisMeshManagementWindow::discretizationModeChanged(int val)
mmAtts->SetDiscretizationMode(MeshManagementAttributes::Uniform);
else if (val == 1)
{
#ifdef HAVE_BILIB
#ifdef HAVE_BOOST
mmAtts->SetDiscretizationMode(MeshManagementAttributes::Adaptive);
flatEnoughLineEdit->setEnabled(true);
#else
......
......@@ -41,8 +41,8 @@
* Optional libraries
******************************************************************************/
/* Define if you have the boost interval template library. */
#cmakedefine HAVE_BILIB
/* Define if you have the boost library. */
#cmakedefine HAVE_BOOST
/* Define if you have the EAVL library. */
#cmakedefine HAVE_LIBEAVL
......
......@@ -99,7 +99,6 @@ ExternalSurface
ExtractPointFunction2D
Extrude
FFT
FiveFoldTetSubdivision
Flux
LCS
IndexSelect
......@@ -138,6 +137,14 @@ Tube
ZoneDump
)
#####
# FiveFoldTetSubdivision requires boost
#####
IF(BOOST_FOUND)
LIST(APPEND REQUIRED_OPERATOR_PLUGINS FiveFoldTetSubdivision)
ENDIF()
# Do not include Poincare on BlueGene/Q because it has a std::map symbol
# that prevents static linking of libpami.a which is needed by MPI on
# that system.
......
......@@ -114,7 +114,6 @@ if ($ARGV[0] eq "-dbio-only")
push @files, get_svn_recursive "./src/plugins";
push @files, get_svn_recursive "./src/svn_bin";
push @files, get_svn_norecursive "./src/third_party_builtin";
push @files, get_svn_recursive "./src/third_party_builtin/bilib";
push @files, get_svn_recursive "./src/third_party_builtin/bow";
push @files, get_svn_recursive "./src/osxfixup";
}
......
......@@ -39,6 +39,9 @@
# Cyrus Harrison, Tue Oct 9 15:44:53 PDT 2012
# Added tess2
#
# Cyrus Harrison, Mon Jan 26 21:26:34 PST 2015
# Removed bilib
#
#****************************************************************************/
PROJECT(thirdparty_builtins)
......@@ -47,7 +50,6 @@ IF(VISIT_USE_GLEW)
ADD_SUBDIRECTORY(glew)
ENDIF(VISIT_USE_GLEW)
ADD_SUBDIRECTORY(verdict)
ADD_SUBDIRECTORY(bilib)
ADD_SUBDIRECTORY(tess2)
IF(VISIT_PARALLEL)
ADD_SUBDIRECTORY(cognomen)
......
......@@ -115,9 +115,9 @@ ${VTK_INCLUDE_DIRS}
${BOOST_INCLUDE_DIR}
)
IF(HAVE_BILIB)
IF(HAVE_BOOST)
ADD_DEFINITIONS(-D__USE_ISOC99)
ENDIF(HAVE_BILIB)
ENDIF(HAVE_BOOST)
# Add link directories needed to use our libraries and VTK.
LINK_DIRECTORIES(${LIBRARY_OUTPUT_DIRECTORY} ${VTK_LIBRARY_DIRS})
......
......@@ -75,7 +75,7 @@
#include <DebugStream.h>
#include <ImproperUseException.h>
#ifdef HAVE_BILIB
#ifdef HAVE_BOOST
#include <boost/numeric/interval.hpp>
using boost::numeric::interval;
#endif
......@@ -236,7 +236,7 @@ bool
vtkCSGGrid::Box::IsFlatEnough2(const double *const gridBoundaries,
int boundaryId, double tol)
{
#ifdef HAVE_BILIB
#ifdef HAVE_BOOST
const double *const a = &gridBoundaries[boundaryId * NUM_QCOEFFS];
// compute spatial box
......@@ -334,7 +334,7 @@ vtkCSGGrid::Box::CanBeCut2(const double *const gridBoundaries,
vtkCSGGrid::Box::FuncState
vtkCSGGrid::Box::EvalBoxStateOfBoundary(const double *const a, double tol) const
{
#ifdef HAVE_BILIB
#ifdef HAVE_BOOST
interval<double> X(x0,x1);
interval<double> Y(y0,y1);
interval<double> Z(z0,z1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment