Commit ecbbb477 authored by David Thompson's avatar David Thompson

Exorcise CGM and OCE from the superbuild.

parent 1f9eca3b
......@@ -36,7 +36,6 @@ function (superbuild_find_projects var)
set(projects
boost
bzip2
cgm
cmb
cmbusersguide
cmbworkflows
......@@ -54,7 +53,6 @@ function (superbuild_find_projects var)
netcdf
nlohmannjson
numpy
oce
opencv
paraview
paraviewweb
......@@ -221,14 +219,12 @@ endif ()
set(suppress_projects
boost
cgm
freetype
ftgl
gdal
hdf5
netcdf
numpy
oce
png
pybind11
szip
......
......@@ -28,9 +28,6 @@ SuperBuild CMake Project.
* turn on `USE_SYSTEM_qt5` in CMake(Recommend)
* sudo apt-get install qt5-qmake libqt5-dev qt5-dev-tools (if using system qt)
* sudo apt-get install libxt-dev
* If cgm is enabled, you need to install mesa and freeglut3 in order to build ftgl
* sudo apt-get install mesa-common-dev
* sudo apt-get install freeglut3-dev
Note that the build process will also download additional tarballs and
checkout additional git repos so you will also need an internet connection.
......
include("${CMAKE_CURRENT_LIST_DIR}/../oce.cmake")
# Pulled from upstream: https://github.com/tpaviot/oce/commit/cbfdba8762e0a3787c7669977e8883366cf2b3e5
superbuild_apply_patch(oce clock-gettime
"Fix clock_gettime detection on macOS")
oce-clock-gettime.patch -whitespace
diff -Nr -U5 oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4/adm/cmake/TKernel/CMakeLists.txt oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.clock-gettime/adm/cmake/TKernel/CMakeLists.txt
--- oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4/adm/cmake/TKernel/CMakeLists.txt 2016-06-15 16:45:18.000000000 -0400
+++ oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.clock-gettime/adm/cmake/TKernel/CMakeLists.txt 2017-07-24 14:52:48.491328969 -0400
@@ -26,23 +26,21 @@
ENDIF(CMAKE_THREAD_LIBS_INIT)
SET(TOOLKIT_LIBS ${TOOLKIT_LIBS} ${CMAKE_DL_LIBS} ${LM})
IF(WIN32)
SET(TOOLKIT_LIBS ${TOOLKIT_LIBS} ${CSF_SOCKETLibs_LIB} ${CSF_advapi32_LIB} ${CSF_gdi32_LIB} ${CSF_user32_LIB} ${CSF_kernel32_LIB} ${CSF_psapi_LIB})
ELSE(WIN32)
- #  An implementation for Mac OS X has been added in src/OSD/gettime_osx.h
- IF(NOT APPLE)
- INCLUDE( CheckFunctionExists )
- CHECK_FUNCTION_EXISTS( clock_gettime CLOCK_GETTIME_IN_LIBC )
- IF(NOT CLOCK_GETTIME_IN_LIBC)
+ if(NOT HAVE_CLOCK_GETTIME)
+ # An implementation for macOS has been added in src/OSD/gettime_osx.h
+ if(NOT APPLE)
INCLUDE( CheckLibraryExists )
CHECK_LIBRARY_EXISTS(rt clock_gettime "" CLOCK_GETTIME_IN_LIBRT)
IF(NOT CLOCK_GETTIME_IN_LIBRT)
MESSAGE(FATAL_ERROR "Could not find clock_gettime.")
ENDIF(NOT CLOCK_GETTIME_IN_LIBRT)
SET(TOOLKIT_LIBS ${TOOLKIT_LIBS} rt)
- ENDIF(NOT CLOCK_GETTIME_IN_LIBC)
- ENDIF(NOT APPLE)
+ endif(NOT APPLE)
+ endif(NOT HAVE_CLOCK_GETTIME)
ENDIF(WIN32)
# Adde-DHAVE_TBB in TKernel in order to benefit from Standard_MMgrTBBalloc
IF(${PROJECT_NAME}_TBB_MALLOC_SUPPORT AND TBB_INCLUDE_DIR AND TBB_MALLOC_LIBRARY)
ADD_DEFINITIONS(-DHAVE_TBB)
diff -Nr -U5 oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4/CMakeLists.txt oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.clock-gettime/CMakeLists.txt
--- oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4/CMakeLists.txt 2016-06-15 16:45:18.000000000 -0400
+++ oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.clock-gettime/CMakeLists.txt 2017-07-24 14:51:57.721752616 -0400
@@ -571,10 +571,11 @@
CHECK_FUNCTION_EXISTS(signal HAVE_SIGNAL)
CHECK_FUNCTION_EXISTS(statfs HAVE_STATFS)
CHECK_FUNCTION_EXISTS(statvfs HAVE_STATVFS)
CHECK_FUNCTION_EXISTS(finite HAVE_FINITE)
CHECK_FUNCTION_EXISTS(localtime_r HAVE_LOCALTIME_R)
+ check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
SET(CMAKE_REQUIRED_LIBRARIES sunmath)
CHECK_FUNCTION_EXISTS(ieee_handler HAVE_SUNMATH)
SET(CMAKE_REQUIRED_LIBRARIES)
INCLUDE(CheckTypeSize)
SET(CMAKE_EXTRA_INCLUDE_FILES sys/time.h)
diff -Nr -U5 oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4/oce_build_config.h.cmake oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.clock-gettime/oce_build_config.h.cmake
--- oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4/oce_build_config.h.cmake 2016-06-15 16:45:18.000000000 -0400
+++ oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.clock-gettime/oce_build_config.h.cmake 2017-07-24 14:57:06.400276807 -0400
@@ -104,10 +104,13 @@
#cmakedefine HAVE_STATFS 1
/* Define to 1 if you have the `statvfs' function. */
#cmakedefine HAVE_STATVFS 1
+/* Define to 1 if the clock_gettime function is available in libc. */
+#cmakedefine HAVE_CLOCK_GETTIME 1
+
/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1
diff -Nr -U5 oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4/src/OSD/OSD_Chronometer.cxx oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.clock-gettime/src/OSD/OSD_Chronometer.cxx
--- oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4/src/OSD/OSD_Chronometer.cxx 2016-06-15 16:45:18.000000000 -0400
+++ oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.clock-gettime/src/OSD/OSD_Chronometer.cxx 2017-07-24 14:51:24.090708402 -0400
@@ -73,11 +73,11 @@
#if (defined(__APPLE__))
#include <mach/task.h>
#include <mach/mach.h>
#endif
-#if defined(__APPLE__) && defined(__MACH__)
+#if defined(__APPLE__) && !defined(HAVE_CLOCK_GETTIME)
#include "gettime_osx.h"
#endif
//=======================================================================
//function : GetProcessCPU
superbuild_add_project(cgm
DEPENDS oce
DEPENDS_OPTIONAL cxx11
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DCGM_USE_CUBIT:BOOL=OFF
-DCGM_OCC:BOOL=ON
-DUSE_MPI:BOOL=OFF)
superbuild_add_extra_cmake_args(
"-DCGM_DIR:PATH=<INSTALL_DIR>/lib/cmake/CGM")
......@@ -91,11 +91,6 @@ if (NOT ${LINK_TO_PLUGINS})
smtkVTKOperationsPlugin
)
if (cgm_enabled)
list(APPEND cmb_plugins_smtk
smtkCGMSessionPlugin)
endif ()
if (matplotlib_enabled)
list(APPEND cmb_plugins_smtk
smtkMatplotlibPlugin)
......
......@@ -33,7 +33,7 @@ superbuild_add_project(cmb
INDEPENDENT_STEP_TARGETS ${cmb_lfs_steps} download update
DEPENDS boost moab remus vxl nlohmannjson python paraview pybind11
qt qt5 zeromq cmbworkflows cmbusersguide smtkusersguide
DEPENDS_OPTIONAL smtk cgm cumulus ${cmb_extra_optional_dependencies}
DEPENDS_OPTIONAL smtk cumulus ${cmb_extra_optional_dependencies}
cxx11 gdal hdf5 netcdf opencv
CMAKE_ARGS
${cmb_extra_cmake_args}
......@@ -59,7 +59,6 @@ superbuild_add_project(cmb
-DSMTK_ENABLE_QT_SUPPORT:BOOL=ON
-DSMTK_ENABLE_VTK_SUPPORT:BOOL=ON
-DSMTK_ENABLE_PARAVIEW_SUPPORT:BOOL=ON
-DSMTK_ENABLE_CGM_SESSION:BOOL=${cgm_enabled}
-DSMTK_ENABLE_DISCRETE_SESSION:BOOL=ON
-DSMTK_ENABLE_EXODUS_SESSION:BOOL=ON
-DSMTK_ENABLE_REMOTE_SESSION:BOOL=ON
......
superbuild_add_project(moab
DEPENDS eigen hdf5 netcdf
DEPENDS_OPTIONAL cxx11
#cgm
CMAKE_ARGS
-Wno-dev
-DBUILD_SHARED_LIBS:BOOL=OFF
......
superbuild_add_project(oce
DEPENDS ftgl freetype
DEPENDS_OPTIONAL cxx11
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
-DOCE_DISABLE_X11:BOOL=ON
-DOCE_INSTALL_PREFIX:FILEPATH=<INSTALL_DIR>
# Force the include dir path, so it doesn't install the include files into
# install/include/oce/, because CGM can't find it there.
-DOCE_INSTALL_INCLUDE_DIR:FILEPATH=include
-DOCE_RPATH_FILTER_SYSTEM_PATHS:BOOL=OFF)
# Remove the installed oce-config.h from the install tree so that the build
# doesn't use that over the configured header in the build directory. If we
# used the installed oce-config the incremental builds may fail as it may not
# have all the defines as the build version.
superbuild_project_add_step(oce-incremental-build
COMMAND "${CMAKE_COMMAND}"
-E remove
-f
"<INSTALL_DIR>/include/oce-config.h"
COMMENT "Remove header which confuses the build"
DEPENDEES configure
DEPENDERS build
ALWAYS 1)
......@@ -42,7 +42,7 @@ superbuild_add_project(smtk
DEFAULT_ON
INDEPENDENT_STEP_TARGETS ${smtk_lfs_steps} download update
DEPENDS boost cxx11 eigen hdf5 moab netcdf nlohmannjson
DEPENDS_OPTIONAL cgm cumulus gdal netcdf opencv paraview pybind11 python
DEPENDS_OPTIONAL cumulus gdal netcdf opencv paraview pybind11 python
matplotlib remus qt qt5 vtkonly vxl
CMAKE_ARGS
${smtk_extra_cmake_args}
......@@ -53,7 +53,6 @@ superbuild_add_project(smtk
-DSMTK_ENABLE_VTK_SUPPORT:BOOL=${smtk_enable_vtk}
-DSMTK_ENABLE_VXL_SUPPORT:BOOL=${vxl_enabled}
-DSMTK_ENABLE_PARAVIEW_SUPPORT:BOOL=${paraview_enabled}
-DSMTK_ENABLE_CGM_SESSION:BOOL=${cgm_enabled}
-DSMTK_ENABLE_DISCRETE_SESSION:BOOL=${smtk_enable_vtk}
-DSMTK_ENABLE_EXODUS_SESSION:BOOL=${paraview_enabled}
-DSMTK_ENABLE_REMOTE_SESSION:BOOL=${remus_enabled}
......
include("${CMAKE_CURRENT_LIST_DIR}/../oce.cmake")
superbuild_apply_patch(oce va-args-by-reference
"Do not pass references to va_start().")
superbuild_apply_patch(oce stat-collision-fix
"Avoid collision with Windows 'stat'.")
superbuild_apply_patch(oce define-timezone
"Enable 'timezone' #define.")
diff -Nr -U5 src/src/STEPConstruct/STEPConstruct_AP203Context.cxx src.timezone/src/STEPConstruct/STEPConstruct_AP203Context.cxx
--- src/src/STEPConstruct/STEPConstruct_AP203Context.cxx 2016-06-15 16:45:18.000000000 -0400
+++ src.timezone/src/STEPConstruct/STEPConstruct_AP203Context.cxx 2018-03-20 12:54:28.000000000 -0400
@@ -62,13 +62,13 @@
#include <StepAP203_HArray1OfClassifiedItem.hxx>
#include <StepAP203_HArray1OfDateTimeItem.hxx>
#include <StepAP203_HArray1OfApprovedItem.hxx>
#include <StepBasic_ProductCategory.hxx>
-#ifdef __BORLANDC__
+//#ifdef __BORLANDC__
# define timezone _timezone
-#endif
+//#endif
//=======================================================================
//function : STEPConstruct_AP203Context
//purpose :
//=======================================================================
diff -Nr -U5 src/src/Interface/Interface_STAT.cxx src.stat_collision_fix/src/Interface/Interface_STAT.cxx
--- src/src/Interface/Interface_STAT.cxx 2016-06-15 16:45:18.000000000 -0400
+++ src.stat_collision_fix/src/Interface/Interface_STAT.cxx 2018-03-20 12:51:06.000000000 -0400
@@ -13,11 +13,11 @@
// Initial Developer hereby disclaims all such warranties, including without
// limitation, any warranties of merchantability, fitness for a particular
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
-#include <Interface_STAT.ixx>
+#include <Interface_stat.ixx>
#include <TCollection_AsciiString.hxx>
static Interface_STAT statvoid("");
static Interface_STAT statact ("");
static Standard_CString voidname = "";
@@ -150,19 +150,19 @@
olditp, // nb items deja passes (cycles passes) / phase
numcyc, // n0 cycle en cours / phase
nbitc, // nb items cycle en cours
numst, // n0 etape en cours / cycle
numitem; // nb items deja passes / etape courante
-} stat;
+} stat_;
void Interface_STAT::Start
(const Standard_Integer items, const Standard_Integer cycles) const
{
statact = *this;
- statact.Description (stat.nbph,stat.otal,stat.itle);
- stat.oldph = stat.phw = 0.; stat.numph = 0;
+ statact.Description (stat_.nbph,stat_.otal,stat_.itle);
+ stat_.oldph = stat_.phw = 0.; stat_.numph = 0;
NextPhase (items,cycles);
}
void Interface_STAT::StartCount
(const Standard_Integer items, const Standard_CString name)
@@ -173,70 +173,70 @@
void Interface_STAT::NextPhase
(const Standard_Integer items, const Standard_Integer cycles)
{
// On cumule la phase precedente au total, on efface les donnees "locales"
- stat.numcyc = stat.numst = stat.olditp = 0; stat.oldst = stat.stw = 0.;
- if (stat.numph >= stat.nbph) { End(); return; }
+ stat_.numcyc = stat_.numst = stat_.olditp = 0; stat_.oldst = stat_.stw = 0.;
+ if (stat_.numph >= stat_.nbph) { End(); return; }
- stat.numph ++; stat.oldph += stat.phw; // cumule sur cette phase
- stat.nbitp = items; stat.nbcyc = cycles;
- statact.Phase(stat.numph, stat.n0,stat.n1,stat.phw,stat.name);
- stat.otph = (stat.n1 > 1 ? statact.Step (stat.n0) : 1.);
+ stat_.numph ++; stat_.oldph += stat_.phw; // cumule sur cette phase
+ stat_.nbitp = items; stat_.nbcyc = cycles;
+ statact.Phase(stat_.numph, stat_.n0,stat_.n1,stat_.phw,stat_.name);
+ stat_.otph = (stat_.n1 > 1 ? statact.Step (stat_.n0) : 1.);
// si un seul cycle, on le demarre; sinon, attendre NextCycle
- stat.nbitc = 0;
+ stat_.nbitc = 0;
if (cycles == 1) NextCycle (items);
}
void Interface_STAT::SetPhase
(const Standard_Integer items, const Standard_Integer cycles)
- { stat.nbitp = items; stat.nbcyc = cycles; }
+ { stat_.nbitp = items; stat_.nbcyc = cycles; }
void Interface_STAT::NextCycle (const Standard_Integer items)
{
// cumul de ce cycle sur les cycles deja passes, raz etapes
- stat.numcyc ++; stat.olditp += stat.nbitc;
-// if (stat.olditem > stat.nbitp) return;
- stat.numst = 1;
- stat.oldst = 0.;
- stat.stw = (stat.n1 > 1 ? statact.Step(stat.n0 + 1) : stat.otph);
- stat.nbitc = items; stat.numitem = 0;
+ stat_.numcyc ++; stat_.olditp += stat_.nbitc;
+// if (stat_.olditem > stat_.nbitp) return;
+ stat_.numst = 1;
+ stat_.oldst = 0.;
+ stat_.stw = (stat_.n1 > 1 ? statact.Step(stat_.n0 + 1) : stat_.otph);
+ stat_.nbitc = items; stat_.numitem = 0;
}
void Interface_STAT::NextStep ()
{
- if (stat.numst >= stat.n1) return;
- stat.numst ++; stat.oldst += stat.stw;
- stat.numitem = 0;
- stat.stw = statact.Step (stat.n0 + stat.numst);
+ if (stat_.numst >= stat_.n1) return;
+ stat_.numst ++; stat_.oldst += stat_.stw;
+ stat_.numitem = 0;
+ stat_.stw = statact.Step (stat_.n0 + stat_.numst);
}
void Interface_STAT::NextItem (const Standard_Integer nbitems)
- { stat.numitem += nbitems; }
+ { stat_.numitem += nbitems; }
void Interface_STAT::End ()
-{ stat.oldph = stat.otal; stat.phw = stat.stw = 0.; stat.itle = stat.name = voidname; }
+{ stat_.oldph = stat_.otal; stat_.phw = stat_.stw = 0.; stat_.itle = stat_.name = voidname; }
// ########### QUERY ############
Standard_CString Interface_STAT::Where (const Standard_Boolean phase)
- { return (phase ? stat.name : stat.itle); }
+ { return (phase ? stat_.name : stat_.itle); }
Standard_Integer Interface_STAT::Percent (const Standard_Boolean phase)
{
- if (stat.numitem > stat.nbitc) stat.numitem = stat.nbitc;
+ if (stat_.numitem > stat_.nbitc) stat_.numitem = stat_.nbitc;
// on compte les items deja passes
Standard_Real enphase =
- stat.olditp * stat.otph + // cycles complets passes
- stat.nbitc * stat.oldst + // cycle courant, etapes completes passees
- stat.numitem * stat.stw; // etape courante
+ stat_.olditp * stat_.otph + // cycles complets passes
+ stat_.nbitc * stat_.oldst + // cycle courant, etapes completes passees
+ stat_.numitem * stat_.stw; // etape courante
// proportion pour cette phase
- Standard_Real prophase = enphase / (stat.nbitp * stat.otph);
+ Standard_Real prophase = enphase / (stat_.nbitp * stat_.otph);
Standard_Integer res = Standard_Integer (prophase*100.);
if (phase) return res;
// voila pour cette phase
// comptage dans les phases
- Standard_Real encours = (stat.oldph + stat.phw * prophase) / stat.otal;
+ Standard_Real encours = (stat_.oldph + stat_.phw * prophase) / stat_.otal;
res = Standard_Integer (encours * 100.);
return res;
}
diff -Nr -U5 src/src/OSD/OSD_FileNode.cxx src.va_args_fix/src/OSD/OSD_FileNode.cxx
--- src/src/OSD/OSD_FileNode.cxx 2016-06-15 16:45:18.000000000 -0400
+++ src.va_args_fix/src/OSD/OSD_FileNode.cxx 2018-03-20 10:36:59.000000000 -0400
@@ -966,11 +966,13 @@
DWORD errCode;
Standard_Character buffer[ 2048 ];
va_list arg_ptr;
- va_start ( arg_ptr, err );
+ OSD_Error errVal = err;
+ va_start ( arg_ptr, errVal );
+ err = errVal;
errCode = GetLastError ();
if ( !FormatMessage (
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY,
......@@ -119,16 +119,6 @@ superbuild_set_revision(ftgl
URL "https://www.paraview.org/files/dependencies/ftgl-dfd7c9f0dee7f0059d5784f3a71118ae5c0afff4.tar.bz2"
URL_MD5 16e54c7391f449c942f3f12378db238f)
superbuild_set_revision(oce
# https://github.com/mathstuf/oce.git
URL "https://www.paraview.org/files/dependencies/oce-9b4646a11c7d9be65a6c2df0ade6604cc91b1fa4.tar.bz2"
URL_MD5 adea5bd5a7510c7da58755ca7d964319)
superbuild_set_revision(cgm
# https://bitbucket.org/mathstuf/cgm.git
URL "http://www.computationalmodelbuilder.org/files/dependencies/cgm-3191a7219e16491ebe098159598ddfe7f039bffc.tar.bz2"
URL_MD5 bf280f3bc5970c98960da9a66da2ab94)
superbuild_set_revision(paraviewwebvisualizer
URL "https://www.paraview.org/files/dependencies/visualizer-2.0.12.tar.gz"
URL_MD5 56e7e241ea6ad66b44469fc3186f47d6)
......
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