mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
Updated boost to version 1.76.0
This commit is contained in:
parent
31bd324e66
commit
336b9bc333
2 changed files with 35 additions and 35 deletions
38
external/external_build.cmake
vendored
38
external/external_build.cmake
vendored
|
@ -40,7 +40,7 @@ IF(INTERNAL_NETCDF)
|
|||
ENDIF(INTERNAL_NETCDF)
|
||||
|
||||
IF(INTERNAL_BOOST)
|
||||
SET(BOOST_URL "https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.gz" CACHE STRING "URL to download Boost from")
|
||||
SET(BOOST_URL "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz" CACHE STRING "URL to download Boost from")
|
||||
mark_as_advanced(BOOST_URL)
|
||||
ELSE(INTERNAL_BOOST)
|
||||
find_package(Boost 1.74.0 COMPONENTS format spirit phoenix python FATAL_ERROR)
|
||||
|
@ -76,11 +76,11 @@ if (INTERNAL_GENGETOPT)
|
|||
ExternalProject_Add(gengetopt
|
||||
PREFIX ${BUILD_PREFIX}/gengetopt-prefix
|
||||
URL ${GENGETOPT_URL}
|
||||
CONFIGURE_COMMAND ${GENGETOPT_SOURCE_DIR}/configure
|
||||
--prefix=${GENGETOPT_BIN_DIR}
|
||||
CONFIGURE_COMMAND ${GENGETOPT_SOURCE_DIR}/configure
|
||||
--prefix=${GENGETOPT_BIN_DIR}
|
||||
CPPFLAGS=${CONFIGURE_CPP_FLAGS}
|
||||
LDFLAGS=${CONFIGURE_LD_FLAGS}
|
||||
CC=${CMAKE_C_COMPILER}
|
||||
CC=${CMAKE_C_COMPILER}
|
||||
CXX=${CMAKE_CXX_COMPILER}
|
||||
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
|
||||
)
|
||||
|
@ -150,15 +150,15 @@ if (INTERNAL_NETCDF)
|
|||
DEPENDS ${hdf5_built}
|
||||
PREFIX ${BUILD_PREFIX}/netcdf-prefix
|
||||
URL ${NETCDF_URL}
|
||||
PATCH_COMMAND ${CMAKE_COMMAND}
|
||||
PATCH_COMMAND ${CMAKE_COMMAND}
|
||||
-DBUILD_PREFIX=${BUILD_PREFIX}/netcdf-prefix
|
||||
-DPATCH_FILE=${CMAKE_SOURCE_DIR}/external/patch_netcdf
|
||||
-DSOURCE_PREFIX=${BUILD_PREFIX}/netcdf-prefix/src/netcdf/ncgen3
|
||||
-P ${CMAKE_SOURCE_DIR}/external/check_and_apply_patch.cmake
|
||||
CONFIGURE_COMMAND env PATH=${EXT_INSTALL}/bin:$ENV{PATH} ${NETCDF_SOURCE_DIR}/configure
|
||||
--prefix=${NETCDF_BIN_DIR} --libdir=${NETCDF_BIN_DIR}/lib
|
||||
--enable-netcdf-4 --with-pic --disable-shared --disable-dap
|
||||
--disable-cdmremote --disable-rpc
|
||||
--enable-netcdf-4 --with-pic --disable-shared --disable-dap
|
||||
--disable-cdmremote --disable-rpc
|
||||
--disable-examples ${EXTRA_NC_FLAGS} CC=${CMAKE_C_COMPILER}
|
||||
CXX=${CMAKE_CXX_COMPILER}
|
||||
BUILD_IN_SOURCE 1
|
||||
|
@ -171,7 +171,7 @@ if (INTERNAL_NETCDF)
|
|||
URL ${NETCDFCXX_URL}
|
||||
CONFIGURE_COMMAND env PATH=${EXT_INSTALL}/bin:$ENV{PATH} ${NETCDF_CXX_SOURCE_DIR}/configure
|
||||
--prefix=${NETCDF_BIN_DIR} --libdir=${NETCDF_BIN_DIR}/lib
|
||||
--with-pic --disable-shared
|
||||
--with-pic --disable-shared
|
||||
--disable-examples ${EXTRA_NC_FLAGS} CC=${CMAKE_C_COMPILER}
|
||||
CXX=${CMAKE_CXX_COMPILER}
|
||||
BUILD_IN_SOURCE 1
|
||||
|
@ -191,7 +191,7 @@ ELSE(INTERNAL_NETCDF)
|
|||
find_library(NETCDFCPP_LIBRARY netcdf_c++)
|
||||
find_path(NETCDF_INCLUDE_PATH NAMES netcdf.h)
|
||||
find_path(NETCDFCPP_INCLUDE_PATH NAMES netcdf)
|
||||
SET(CONFIGURE_CPP_FLAGS ${CONFIGURE_CPP_FLAGS}
|
||||
SET(CONFIGURE_CPP_FLAGS ${CONFIGURE_CPP_FLAGS}
|
||||
-I${NETCDF_INCLUDE_PATH} -I${NETCDFCPP_INCLUDE_PATH})
|
||||
endif (INTERNAL_NETCDF)
|
||||
mark_as_advanced(NETCDF_LIBRARY NETCDFCPP_LIBRARY NETCDF_INCLUDE_PATH NETCDFCPP_INCLUDE_PATH)
|
||||
|
@ -227,14 +227,14 @@ if (INTERNAL_BOOST)
|
|||
SET(LINKER_EXTRA_FLAGS "${LINKER_EXTRA_FLAGS} -L${EXT_INSTALL}/lib")
|
||||
|
||||
message(STATUS "Building boost with toolset ${b2_toolset}")
|
||||
|
||||
|
||||
SET(BOOST_LIBRARIES
|
||||
${EXT_INSTALL}/lib/libboost_exception.a
|
||||
)
|
||||
|
||||
ExternalProject_Add(boost
|
||||
URL ${BOOST_URL}
|
||||
URL_HASH SHA1=107cebeec706988639cf2932fc0ce43200de4c0a
|
||||
URL_HASH SHA1=a5ab6eaf31d1ca181a17ecffef9d58d40d87c71d
|
||||
PREFIX ${BUILD_PREFIX}/boost-prefix
|
||||
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DTOOLSET=${b2_toolset} "-DCOMPILER:STRING=${CMAKE_CXX_COMPILER}" "-DCOMPILER_EXTRA_FLAGS=${COMPILER_EXTRA_FLAGS}" "-DINSTALL_PATH:STRING=${EXT_INSTALL}" "-DLINKER_EXTRA_FLAGS=${LINKER_EXTRA_FLAGS}" "-DSRC_DIR:STRING=${BOOST_SOURCE_DIR}" -P ${CMAKE_SOURCE_DIR}/external/configure_boost.cmake
|
||||
BUILD_IN_SOURCE 1
|
||||
|
@ -308,7 +308,7 @@ SET(CFITSIO_LIBRARY ${EXT_INSTALL}/lib/libcfitsio.a)
|
|||
SET(CFITSIO_INCLUDE_PATH ${EXT_INSTALL}/include)
|
||||
|
||||
#################
|
||||
# Build Healpix
|
||||
# Build Healpix
|
||||
#################
|
||||
SET(HEALPIX_BUILD ${BUILD_PREFIX}/healpix-prefix/src/healpix-build)
|
||||
SET(HEALPIX_DIR ${BUILD_PREFIX}/healpix-prefix/src/healpix)
|
||||
|
@ -341,11 +341,11 @@ if (INTERNAL_QHULL)
|
|||
ExternalProject_Add(qhull
|
||||
URL ${QHULL_URL}
|
||||
PREFIX ${BUILD_PREFIX}/qhull-prefix
|
||||
CMAKE_ARGS
|
||||
CMAKE_ARGS
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/ext_build/qhull
|
||||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
|
||||
|
||||
)
|
||||
SET(QHULL_DIR ${CMAKE_BINARY_DIR}/ext_build/qhull)
|
||||
SET(QHULL_LIBRARY ${QHULL_DIR}/lib/libqhullstatic_p.a)
|
||||
|
@ -376,9 +376,9 @@ IF(SDF_SUPPORT)
|
|||
BUILD_COMMAND ${CMAKE_MAKE_PROGRAM} -f Make.simple
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} -DDEST_DIR=${CMAKE_BINARY_DIR}/ext_build/sdf -DLIBSDF_ARCH=${LIBSDF_ARCH} -DLIBSDF_PATH=${BUILD_PREFIX}/libSDF-prefix/src/libSDF -P ${CMAKE_SOURCE_DIR}/external/install_sdf.cmake
|
||||
BUILD_IN_SOURCE 1
|
||||
PATCH_COMMAND ${CMAKE_COMMAND}
|
||||
PATCH_COMMAND ${CMAKE_COMMAND}
|
||||
-DBUILD_PREFIX=${BUILD_PREFIX}/libSDF-prefix
|
||||
-DPATCH_FILE=${CMAKE_SOURCE_DIR}/external/patch_sdf
|
||||
-DPATCH_FILE=${CMAKE_SOURCE_DIR}/external/patch_sdf
|
||||
-DSOURCE_PREFIX=${BUILD_PREFIX}/libSDF-prefix/src/libSDF
|
||||
-P ${CMAKE_SOURCE_DIR}/external/check_and_apply_patch.cmake
|
||||
)
|
||||
|
@ -391,9 +391,9 @@ IF(SDF_SUPPORT)
|
|||
ENDIF (RT_LIBRARY)
|
||||
ENDIF(SDF_SUPPORT)
|
||||
|
||||
include_directories(${CMAKE_BINARY_DIR}/src
|
||||
${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH}
|
||||
${HDF5_INCLUDE_PATH}
|
||||
include_directories(${CMAKE_BINARY_DIR}/src
|
||||
${NETCDF_INCLUDE_PATH} ${GSL_INCLUDE_PATH}
|
||||
${HDF5_INCLUDE_PATH}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${QHULL_INCLUDE_PATH} ${LIBSDF_INCLUDE_PATH})
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ int compar(const void * n1, const void * n2) {
|
|||
|
||||
/* Finds Delaunay adjacencies of a set of points */
|
||||
int delaunadj (coordT *points, int nvp, int nvpbuf, int nvpall, PARTADJ **adjs) {
|
||||
|
||||
|
||||
int dim= 3; /* dimension of points */
|
||||
boolT ismalloc= False; /* True if qhull should free points in qh_freeqhull() or reallocation */
|
||||
char flags[250]; /* option flags for qhull, see qh_opt.htm */
|
||||
|
@ -34,9 +34,9 @@ int delaunadj (coordT *points, int nvp, int nvpbuf, int nvpall, PARTADJ **adjs)
|
|||
facetT *facet, **facetp, *neighbor, **neighborp;
|
||||
pointT *point, **pointp;
|
||||
int numdiv;
|
||||
|
||||
|
||||
PARTADJ adjst;
|
||||
|
||||
|
||||
int errorReported = 0;
|
||||
|
||||
adjst.adj = (int *)malloc(MAXVERVER*sizeof(int));
|
||||
|
@ -48,14 +48,14 @@ int delaunadj (coordT *points, int nvp, int nvpbuf, int nvpall, PARTADJ **adjs)
|
|||
/* Delaunay triangulation*/
|
||||
sprintf (flags, "qhull s d Qt");
|
||||
exitcode= qh_new_qhull (dim, nvpall, points, ismalloc,
|
||||
flags, outfile, errfile);
|
||||
|
||||
flags, outfile, errfile);
|
||||
|
||||
|
||||
if (!exitcode) { /* if no error */
|
||||
/* 'qh facet_list' contains the convex hull */
|
||||
|
||||
|
||||
/* From qh_printvneighbors */
|
||||
qh_countfacets(qh facet_list, NULL, 0, &numfacets, &numsimplicial,
|
||||
qh_countfacets(qh facet_list, NULL, 0, &numfacets, &numsimplicial,
|
||||
&totneighbors, &numridges, &numcoplanars, &numtricoplanars);
|
||||
qh_vertexneighbors();
|
||||
vertices= qh_facetvertices (qh facet_list, NULL, 0);
|
||||
|
@ -72,7 +72,7 @@ int delaunadj (coordT *points, int nvp, int nvpbuf, int nvpall, PARTADJ **adjs)
|
|||
ver = 0;
|
||||
FOREACHvertex_i_(vertex_points) {
|
||||
(*adjs)[ver].nadj = 0;
|
||||
if (vertex) {
|
||||
if (vertex) {
|
||||
/* Count the neighboring vertices, check that all are real
|
||||
neighbors */
|
||||
adjst.nadj = 0;
|
||||
|
@ -139,12 +139,12 @@ int delaunadj (coordT *points, int nvp, int nvpbuf, int nvpall, PARTADJ **adjs)
|
|||
}
|
||||
qh_freeqhull(!qh_ALL); /* free long memory */
|
||||
qh_memfreeshort (&curlong, &totlong); /* free short memory and memory allocator */
|
||||
if (curlong || totlong)
|
||||
if (curlong || totlong)
|
||||
fprintf (errfile, "qhull internal warning (delaunadj): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong);
|
||||
free(adjst.adj);
|
||||
return exitcode;
|
||||
}
|
||||
|
||||
|
||||
/* Calculates the Voronoi volume from a set of Delaunay adjacencies */
|
||||
int vorvol (coordT *deladjs, coordT *points, pointT *intpoints, int numpoints, float *vol) {
|
||||
int dim= 3; /* dimension of points */
|
||||
|
@ -164,7 +164,7 @@ int vorvol (coordT *deladjs, coordT *points, pointT *intpoints, int numpoints, f
|
|||
char region;
|
||||
/*coordT *points;
|
||||
pointT *intpoints;*/
|
||||
|
||||
|
||||
/* make point array from adjacency coordinates (add offset)*/
|
||||
/*points = (coordT *)malloc(4*numpoints*sizeof(coordT));
|
||||
if (points == NULL) {
|
||||
|
@ -185,7 +185,7 @@ int vorvol (coordT *deladjs, coordT *points, pointT *intpoints, int numpoints, f
|
|||
|
||||
exitcode= qh_new_qhull (4, numpoints, points, ismalloc,
|
||||
flags, outfile, errfile);
|
||||
|
||||
|
||||
numpoints = 0;
|
||||
if (!exitcode) { /* if no error */
|
||||
FORALLfacets {
|
||||
|
@ -231,15 +231,15 @@ int vorvol (coordT *deladjs, coordT *points, pointT *intpoints, int numpoints, f
|
|||
sprintf (flags, "qhull FA");
|
||||
exitcode= qh_new_qhull (dim, numpoints, intpoints, ismalloc,
|
||||
flags, outfile, errfile);
|
||||
|
||||
|
||||
qh_getarea(qh facet_list);
|
||||
*vol = qh totvol;
|
||||
|
||||
|
||||
qh_freeqhull (!qh_ALL);
|
||||
qh_memfreeshort (&curlong, &totlong);
|
||||
if (curlong || totlong)
|
||||
if (curlong || totlong)
|
||||
fprintf (errfile, "qhull internal warning (vorvol): did not free %d bytes of long memory (%d pieces)\n", totlong, curlong);
|
||||
/*free(points); free(intpoints);*/
|
||||
|
||||
|
||||
return exitcode;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue