...
 
Commits (613)
*.patch whitespace=-blank-at-eol,-space-before-tab -text *.patch whitespace=-blank-at-eol,-space-before-tab,-blank-at-eof -text -crlf
cmake_minimum_required(VERSION 2.8.11) cmake_minimum_required(VERSION 3.11.2)
if (POLICY CMP0025)
# Clang and AppleClang are now unique compiler ids
cmake_policy(SET CMP0025 NEW)
endif ()
project(cmb-superbuild) project(cmb-superbuild)
list(INSERT CMAKE_MODULE_PATH 0
"${CMAKE_CURRENT_LIST_DIR}/cmake")
macro (superbuild_setup_variables) macro (superbuild_setup_variables)
include(SuperbuildVersionMacros) include(SuperbuildVersionMacros)
superbuild_set_version_variables(cmb "4.0.0" "cmb-version.cmake") if (cmb_SOURCE_SELECTION STREQUAL "git")
# Assuming master; just use the latest version, but let the user set their
# own version in case it is actually a branch from some other version.
set(CMB_VERSION_DEFAULT "6.0.0-develop"
CACHE STRING "The default version of CMB to use if it cannot be detected")
mark_as_advanced(CMB_VERSION_DEFAULT)
set(cmb_default_version "${CMB_VERSION_DEFAULT}")
elseif (cmb_SOURCE_SELECTION STREQUAL "source")
# If it is a git repo, we'll get it that way. Otherwise, we will look at the
# `version.txt` in the checkout.
set(cmb_default_version "")
else ()
# The selection is the version number; use it.
set(cmb_default_version "${cmb_SOURCE_SELECTION}")
endif()
superbuild_set_version_variables(cmb "${cmb_default_version}" "cmb-version.cmake" "version.txt")
set(cmb_version "${cmb_version_major}.${cmb_version_minor}") set(cmb_version "${cmb_version_major}.${cmb_version_minor}")
superbuild_set_version_variables(paraview "5.1.2" "paraview-version.cmake") superbuild_set_version_variables(paraview "5.5.0" "paraview-version.cmake" "version.txt")
set(paraview_version "${paraview_version_major}.${paraview_version_minor}") set(paraview_version "${paraview_version_major}.${paraview_version_minor}")
superbuild_set_version_variables(vtk "8.1.0" "vtk-version.cmake")
set(vtk_version "${vtk_version_major}.${vtk_version_minor}")
endmacro () endmacro ()
function (superbuild_find_projects var) function (superbuild_find_projects var)
include(CMBSuperbuildMacros)
set(projects set(projects
boost boost
bzip2 bzip2
cgm cgm
cmb cmb
cmbusersguide
cmbworkflows cmbworkflows
cumulus
cxx11 cxx11
eigen
fortran
freetype freetype
ftgl ftgl
gdal gdal
hdf5 hdf5
kml lapack
matplotlib
moab moab
netcdf netcdf
nlohmannjson
numpy numpy
oce oce
opencv opencv
opencvcontrib
paraview paraview
paraviewweb
paraviewwebvisualizer
paraviewweblightviz
png png
pybind11
python python
pythongirderclient pythongirderclient
pythonrequests pythonrequests
pythonsetuptools pythonsetuptools
pythonsix pythonsix
qt
qt4 qt4
qt5
remus remus
shiboken
smtk smtk
smtkonly
smtkusersguide
szip szip
vtk
vtkonly
vxl vxl
zeromq zeromq
zlib) zlib)
...@@ -53,13 +84,15 @@ function (superbuild_find_projects var) ...@@ -53,13 +84,15 @@ function (superbuild_find_projects var)
if (NOT WIN32) if (NOT WIN32)
list(APPEND projects list(APPEND projects
fontconfig fontconfig
gperf
libxml2) libxml2)
endif () endif ()
if (WIN32) if (WIN32)
list(APPEND projects list(APPEND projects
ftjam ftjam
pythonsetuptools) pythonsetuptools
pywin32)
endif () endif ()
option(USE_NONFREE_COMPONENTS "Enable the non-free parts of the superbuild" OFF) option(USE_NONFREE_COMPONENTS "Enable the non-free parts of the superbuild" OFF)
...@@ -75,7 +108,15 @@ function (superbuild_find_projects var) ...@@ -75,7 +108,15 @@ function (superbuild_find_projects var)
endfunction () endfunction ()
function (superbuild_sanity_check) function (superbuild_sanity_check)
if (NOT smtk_enabled AND NOT cmb_enabled) if (vtkonly_enabled AND paraview_enabled)
message(FATAL_ERROR
"Only one of the following projects should be enabled: vtkonly, paraview.")
endif ()
if (smtkonly_enabled AND cmb_enabled)
message(FATAL_ERROR
"Only one of the following projects should be enabled: smtkonly, cmb.")
endif ()
if (NOT smtkonly_enabled AND NOT cmb_enabled)
message(FATAL_ERROR message(FATAL_ERROR
"At least one of the following projects must be enabled: cmb, smtk.") "At least one of the following projects must be enabled: cmb, smtk.")
endif () endif ()
...@@ -97,25 +138,36 @@ function (superbuild_add_packaging) ...@@ -97,25 +138,36 @@ function (superbuild_add_packaging)
TGZ) TGZ)
endif () endif ()
if (USE_SYSTEM_qt4) if (qt5_built_by_superbuild)
set(Qt5_DIR "${superbuild_install_location}/lib/cmake/Qt5")
endif ()
if (USE_SYSTEM_qt5)
list(APPEND superbuild_export_variables
Qt5_DIR)
endif ()
include(cmb.suffix)
list(APPEND superbuild_export_variables
CMB_PACKAGE_SUFFIX)
if (cmb_enabled)
set(CMB_PACKAGE_FILE_NAME ""
CACHE STRING "If set, overrides the generated filename for the package")
list(APPEND superbuild_export_variables list(APPEND superbuild_export_variables
QT_LIBRARY_DIR) CMB_PACKAGE_FILE_NAME)
endif () endif ()
foreach (generator IN LISTS generators) foreach (generator IN LISTS generators)
superbuild_add_extra_package_test(modelbuilder "${generator}" superbuild_add_extra_package_test(modelbuilder "${generator}"
LABELS "CMB" LABELS "CMB"
TIMEOUT 1200) TIMEOUT 6400)
superbuild_add_extra_package_test(hydrology "${generator}"
LABELS "CMB"
TIMEOUT 1200)
endforeach () endforeach ()
endfunction () endfunction ()
macro (superbuild_setup_tests) macro (superbuild_setup_tests)
if (cmb_enabled) if (cmb_enabled)
set(DROP_LOCATION "/submit.php?project=CMB") set(DROP_LOCATION "/submit.php?project=CMB")
elseif (smtk_enabled) elseif (smtkonly_enabled)
set(DROP_LOCATION "/submit.php?project=SMTK") set(DROP_LOCATION "/submit.php?project=SMTK")
endif () endif ()
endmacro () endmacro ()
...@@ -123,16 +175,38 @@ endmacro () ...@@ -123,16 +175,38 @@ endmacro ()
function (superbuild_add_tests) function (superbuild_add_tests)
set_property(GLOBAL APPEND set_property(GLOBAL APPEND
PROPERTY PROPERTY
superbuild_test_projects cmb smtk) superbuild_test_projects cmb smtkonly)
endfunction () endfunction ()
set(CMB_TEST_DATA_ROOT "" CACHE PATH "Location of CMB's testing data")
# Default Qt5 to ON.
set(_superbuild_default_qt5 ON)
set(qt5_skip_modules
qtconnectivity
qtgamepad
qtlocation
qtmultimedia
qtsensors
qtserialport
qtwayland
qtwebchannel
qtwebengine
qtwebsockets)
set(boost_minimum_version 1.64.0)
set(boost_libraries set(boost_libraries
atomic atomic
chrono chrono
date_time date_time
filesystem filesystem
log
regex
serialization
system system
thread) thread
timer)
configure_file( configure_file(
"${CMAKE_CURRENT_LIST_DIR}/cmake/CTestCustom.cmake.in" "${CMAKE_CURRENT_LIST_DIR}/cmake/CTestCustom.cmake.in"
...@@ -143,9 +217,29 @@ if (__BUILDBOT_INSTALL_LOCATION) ...@@ -143,9 +217,29 @@ if (__BUILDBOT_INSTALL_LOCATION)
set(superbuild_install_location "${__BUILDBOT_INSTALL_LOCATION}") set(superbuild_install_location "${__BUILDBOT_INSTALL_LOCATION}")
endif () endif ()
set(suppress_projects
boost
cgm
freetype
ftgl
gdal
hdf5
netcdf
numpy
oce
png
pybind11
szip
vxl
zeromq
zlib)
foreach (suppress_project IN LISTS suppress_projects)
set("_superbuild_suppress_${suppress_project}_output" ON)
endforeach ()
list(APPEND superbuild_version_files list(APPEND superbuild_version_files
"${CMAKE_CURRENT_LIST_DIR}/versions.cmake") "${CMAKE_CURRENT_LIST_DIR}/versions.cmake")
list(APPEND extra_ctest_custom_files list(APPEND superbuild_ctest_custom_files
"${CMAKE_CURRENT_BINARY_DIR}/CTestCustom-cmb.cmake") "${CMAKE_CURRENT_BINARY_DIR}/CTestCustom-cmb.cmake")
list(APPEND superbuild_project_roots list(APPEND superbuild_project_roots
"${CMAKE_CURRENT_LIST_DIR}/projects") "${CMAKE_CURRENT_LIST_DIR}/projects")
......
...@@ -2,54 +2,89 @@ ...@@ -2,54 +2,89 @@
# CMB SuperBuild # CMB SuperBuild
Though CMB is relatively simple to build itself, it does depend on a several libraries including Qt, ParaView/VTK, MOAB, etc.. To help make the process of building CMB and the libraries it depends on easier we have create a SuperBuild CMake Project. Though CMB is relatively simple to build itself, it does depend on a several
# What You Need To Start libraries including Qt, ParaView/VTK, MOAB, etc.. To help make the process of
building CMB and the libraries it depends on easier we have created a
SuperBuild CMake Project.
* CMake version 3.5 or greater # Requirements
* ninja or make - note that for Windows build you will need to have ninja installed
* CMake version 3.9 or greater with SSL support (Binaries from `cmake.org`
have this already; custom built CMake binaries need to use
`CMAKE_USE_SYSTEM_CURL=ON`).
* ninja or make - (the Windows build requires ninja)
* Checkout of the [CMB SuperBuild Git Repo](https://gitlab.kitware.com/cmb/cmb-superbuild) * Checkout of the [CMB SuperBuild Git Repo](https://gitlab.kitware.com/cmb/cmb-superbuild)
* Qt Related Info
* Have Qt 5.10 or greater installed on the system and make sure you set USE_SYSTEM_qt5 on
* In CMake: QT5_DIR needs to be set to [Qt installation dir for your compiler]/lib/cmake/Qt5
* C++ Compiler * C++ Compiler
* XCode 7.1 or greater * XCode 9.x or greater
* GCC 4.8 * GCC 4.9 or greater
* Visual Studio 2013 64 bit * Clang 3.4 or greater
* Microsoft Visual C++ 2015 / Build Tools 14.0.25123.0 (and possibly later)
* Ubuntu 16.04 specific
* sudo apt-get install m4
* sudo apt-get install build-essential
* 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 tar balls and checkout additional git repos so you will also need an internet connection. Note that the build process will also download additional tarballs and
checkout additional git repos so you will also need an internet connection.
# Building CMB using the SuperBuild Process # Building CMB using the SuperBuild Process
## Prepping the Git Repo ## Prepping the Git Repo
1. Clone the CMB SuperBuild Repo using git clone https://gitlab.kitware.com/cmb/cmb-superbuild.git 1. Clone the CMB SuperBuild Repo using `git clone https://gitlab.kitware.com/cmb/cmb-superbuild.git`
2. cd into the git repo and do the following commands: 2. Using a shell in the cloned repository check out the latest stable release `git checkout release`
* git submodule init 3. Using a shell in the cloned repository, run `git submodule update --init`
* git submodule update
## Configuring the Build Using CMake ## Configuring the Build Using CMake
There are two possible methods you can use: CMake GUI or the ccmake command line tool There are two possible methods you can use: CMake GUI or the ccmake command line tool
### Using the CMake GUI ### Using the CMake GUI
![](images/CmakeScreenShot.png) ![](images/CmakeScreenShot.png)
1. Select the Source directory that contains the CMake SuperBuild Git Repo 1. Select the Source directory that contains the CMake SuperBuild Git Repo
2. Select the build directory to be used to hold the build. Note that due to a bug in git this should not be under and git repository including the Source Directory. 2. Select the build directory to be used to hold the build. Note that due to
a bug in git this should not be under and git repository including the
Source Directory.
### Using ccmake commandline tool ### Using ccmake commandline tool
1. Make the directory you want to build in
1. Make the directory you want to build in
2. cd into that directory 2. cd into that directory
3. If you are building with ninja (as oppose to make) run ccmake -G Ninja PathToYourSuperBuildRepo, else omit the -G Ninja 3. If you are building with ninja (as oppose to make) run
`ccmake -G Ninja PathToYourSuperBuildRepo`, else omit the `-G Ninja`
### Configuring the CMB SuperBuild ### Configuring the CMB SuperBuild
* By default the build will be in Release Mode (not Debug) - this can be changed using an advance option
* The process will also build Qt 4.8.6 by default. If you already have a Qt installed (4.8.*) then you can do the following: * By default the build will be in Release Mode (not Debug) - this can be
* Turn USE\_SYSTEM\_qt4 on changed using the `CMAKE_BUILD_TYPE_cmb` variable. Similar variables exist
for other projects depending on the setup including `paraview` and `smtk`.
* The process will also build Qt 5.9.1 by default. If you already have a Qt
installed (5.9 or newer) then you can do the following:
* Turn `USE_SYSTEM_qt5` on
* Tell CMake to configure * Tell CMake to configure
* Check to see if the QT\_QMAKE\_EXECUTABLE variable is set to the appropriate qmake - if is not then set it correctly * Check to see if the `Qt5_DIR` variable is set to the appropriate location -
* NOTE! Qt built on Mac OSX 10.9 and greater needs several patches to work properly. These patches are automatically applied when Qt is built using the superbuild and it is the recommended way to build Qt. You will also need to make sure you have a 10.9 SDK on your OSX platform if is not then set it correctly
* tell CMake to configure * On Windows, the directory to the Qt5 libraries must be in the `PATH`
* tell CMake to generate environment variable in order to build.
* Tell CMake to configure
* Tell CMake to generate
## Building the CMB SuperBuild ## Building the CMB SuperBuild
* cd into the build directory * cd into the build directory
* run make or ninja - depending on which build system you previously selected. * run make or ninja - depending on which build system you previously selected.
## Building a CMB Installable Package ## Building a CMB Installable Package
* cd into the build directory * cd into the build directory
* run ctest -R cpack * run ctest -R cpack
\ No newline at end of file
macro (cmb_superbuild_add_pdf name outname)
superbuild_add_project("${name}"
DOWNLOAD_NO_EXTRACT 1
DEFAULT_ON
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
"${CMAKE_COMMAND}" -E copy_if_different
<DOWNLOADED_FILE>
"<INSTALL_DIR>/doc/${outname}")
if (${name}_enabled)
set("${name}_pdf" "${superbuild_install_location}/doc/${outname}")
endif ()
endmacro ()
set_property(GLOBAL
PROPERTY
cmb_superbuild_lfs_steps
lfs-init
lfs-download
lfs-checkout)
macro (cmb_superbuild_add_lfs_steps _name)
superbuild_project_add_step(lfs-init
COMMAND "${GIT_EXECUTABLE}"
lfs
install
--local
DEPENDEES download
DEPENDERS configure
DEPENDS ${ARGN}
COMMENT "Enabling LFS for ${_name}"
WORKING_DIRECTORY <SOURCE_DIR>)
superbuild_project_add_step(lfs-download
COMMAND "${GIT_EXECUTABLE}"
lfs
fetch
DEPENDEES lfs-init
DEPENDERS configure
COMMENT "Downloading LFS data for ${_name}"
WORKING_DIRECTORY <SOURCE_DIR>)
superbuild_project_add_step(lfs-checkout
COMMAND "${GIT_EXECUTABLE}"
lfs
checkout
DEPENDEES lfs-download
DEPENDERS configure
COMMENT "Checking out LFS data for ${_name}"
WORKING_DIRECTORY <SOURCE_DIR>)
endmacro ()
...@@ -10,6 +10,12 @@ set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000) ...@@ -10,6 +10,12 @@ set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS 1000)
##------------------------------------------------------------------------------ ##------------------------------------------------------------------------------
## Regular expression for warning exception during build process ## Regular expression for warning exception during build process
list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
# Ignore all warnings.
".*"
"[w|W]arning"
"WARNING"
"CMake Warning"
"-jN forced in submake: disabling jobserver mode" "-jN forced in submake: disabling jobserver mode"
"thirdparty/qt5json" "thirdparty/qt5json"
"/usr/bin/libtool" "/usr/bin/libtool"
...@@ -29,10 +35,6 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION ...@@ -29,10 +35,6 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"build/.*/doc" "build/.*/doc"
#Shiboken
"CMakeFiles/shiboken.dir"
"libapiextractor.a"
# Boost # Boost
"clang: warning: optimization flag '-finline-functions' is not supported" "clang: warning: optimization flag '-finline-functions' is not supported"
"clang: warning: argument unused during compilation: '-finline-functions'" "clang: warning: argument unused during compilation: '-finline-functions'"
...@@ -77,7 +79,6 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION ...@@ -77,7 +79,6 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
"qmutex.h.* : warning C4512:" "qmutex.h.* : warning C4512:"
"vil3d_dicom.obj : warning LNK4221:" "vil3d_dicom.obj : warning LNK4221:"
"install\\\\include" "install\\\\include"
"shiboken\\\\build"
"smtk\\\\src\\\\smtk\\\\ThirdParty" "smtk\\\\src\\\\smtk\\\\ThirdParty"
"warning C4996: 'strcpy'" "warning C4996: 'strcpy'"
"warning C4996: 'scanf'" "warning C4996: 'scanf'"
...@@ -117,17 +118,15 @@ ignore_project_warnings(boost) ...@@ -117,17 +118,15 @@ ignore_project_warnings(boost)
ignore_project_warnings(gdal) ignore_project_warnings(gdal)
ignore_project_warnings(hdf5) ignore_project_warnings(hdf5)
ignore_project_errors(hdf5) ignore_project_errors(hdf5)
ignore_project_warnings(kml)
ignore_project_warnings(python) ignore_project_warnings(python)
ignore_project_warnings(qt4) ignore_project_warnings(qt5)
ignore_project_warnings(shiboken)
ignore_project_warnings(szip) ignore_project_warnings(szip)
ignore_project_warnings(vxl) ignore_project_warnings(vxl)
ignore_project_warnings(zeromq) ignore_project_warnings(zeromq)
if (WIN32) if (WIN32)
set(ENV{PATH} set(ENV{PATH}
"$ENV{PATH};${CMAKE_CURRENT_LIST_DIR}/install/bin;${CMAKE_CURRENT_LIST_DIR}/install/lib") "$ENV{PATH};${CMAKE_CURRENT_LIST_DIR}/install/bin;${CMAKE_CURRENT_LIST_DIR}/install/lib;${CMAKE_CURRENT_LIST_DIR}/install/x64/vc14/bin")
endif () endif ()
# Regular expression for error exceptions during build process # Regular expression for error exceptions during build process
......
include("${CMAKE_CURRENT_LIST_DIR}/../kml.cmake")
superbuild_apply_patch(kml add-missing-unistd.h
"file_posix.cc misses including unistd.h")
diff -Nru5 src/src/kml/base/file_posix.cc src.add-missing-unistd.h/src/kml/base/file_posix.cc
--- src/src/kml/base/file_posix.cc 2012-04-06 08:25:40.000000000 -0400
+++ src.add-missing-unistd.h/src/kml/base/file_posix.cc 2016-02-23 17:04:57.943711396 -0500
@@ -30,10 +30,13 @@
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
+// posix compile fix:
+#include <unistd.h>
+
namespace kmlbase {
// Internal to the POSIX File class.
static bool StatFile(const char* path, struct stat* stat_data) {
struct stat tmp;
set(cmb_plugins) set(cmb_plugins)
foreach (cmb_plugin IN LISTS cmb_plugins_all) foreach (cmb_plugin IN LISTS cmb_plugins_all)
if (EXISTS "${superbuild_install_location}/Applications/ModelBuilder.app/Contents/Libraries/lib${cmb_plugin}.dylib") if (EXISTS "${superbuild_install_location}/Applications/modelbuilder.app/Contents/Libraries/lib${cmb_plugin}.dylib")
list(APPEND cmb_plugins list(APPEND cmb_plugins
${cmb_plugin}) ${cmb_plugin})
set("cmb_plugin_path_${cmb_plugin}" set("cmb_plugin_path_${cmb_plugin}"
"${superbuild_install_location}/Applications/ModelBuilder.app/Contents/Libraries/lib${cmb_plugin}.dylib") "${superbuild_install_location}/Applications/modelbuilder.app/Contents/Libraries/lib${cmb_plugin}.dylib")
continue () continue ()
endif () endif ()
...@@ -19,13 +19,6 @@ foreach (cmb_plugin IN LISTS cmb_plugins_all) ...@@ -19,13 +19,6 @@ foreach (cmb_plugin IN LISTS cmb_plugins_all)
endforeach () endforeach ()
endforeach () endforeach ()
set(python_modules)
if (pythongirderclient_enabled)
list(APPEND python_modules
requests
girder_client)
endif ()
foreach(program IN LISTS cmb_programs_to_install) foreach(program IN LISTS cmb_programs_to_install)
set(plugins "${cmb_plugins_${program}}") set(plugins "${cmb_plugins_${program}}")
...@@ -95,12 +88,12 @@ foreach(program IN LISTS cmb_programs_to_install) ...@@ -95,12 +88,12 @@ foreach(program IN LISTS cmb_programs_to_install)
"${superbuild_install_location}/lib" "${superbuild_install_location}/lib"
"${superbuild_install_location}/Applications/paraview.app/Contents/Libraries") "${superbuild_install_location}/Applications/paraview.app/Contents/Libraries")
# Install the paraview.vtk module. if (matplotlib_enabled)
install(CODE install(
"file(INSTALL DIRECTORY "${superbuild_install_location}/lib/python2.7/site-packages/matplotlib/mpl-data/"
FILES \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${cmb_package}/${program}.app/Contents/Python/vtk/\" DESTINATION "${cmb_package}/${program}.app/Contents/Python/matplotlib/mpl-data"
DESTINATION \"\${CMAKE_INSTALL_PREFIX}/${cmb_package}/${program}.app/Contents/Python/paraview/vtk\")" COMPONENT superbuild)
COMPONENT superbuild) endif ()
if (pythonrequests_enabled) if (pythonrequests_enabled)
install( install(
...@@ -108,6 +101,36 @@ foreach(program IN LISTS cmb_programs_to_install) ...@@ -108,6 +101,36 @@ foreach(program IN LISTS cmb_programs_to_install)
DESTINATION "${cmb_package}/${program}.app/Contents/Python/requests" DESTINATION "${cmb_package}/${program}.app/Contents/Python/requests"
COMPONENT superbuild) COMPONENT superbuild)
endif () endif ()
if (paraviewweb_enabled)
install(
FILES "${superbuild_install_location}/Applications/paraview.app/Contents/Python/paraview/web/defaultProxies.json"
DESTINATION "${cmb_package}/${program}.app/Contents/Python/paraview/web"
COMPONENT "superbuild")
install(
DIRECTORY "${superbuild_install_location}/share/paraview/web"
DESTINATION "${cmb_package}/${program}.app/Contents/Resources"
COMPONENT "superbuild")
endif ()
foreach (qt5_plugin_path IN LISTS qt5_plugin_paths)
get_filename_component(qt5_plugin_group "${qt5_plugin_path}" DIRECTORY)
get_filename_component(qt5_plugin_group "${qt5_plugin_group}" NAME)
superbuild_apple_install_module(
"\${CMAKE_INSTALL_PREFIX}/${cmb_package}"
"${program}.app"
"${qt5_plugin_path}"
"Contents/Plugins/${qt5_plugin_group}"
SEARCH_DIRECTORIES "${library_paths}")
endforeach ()
if (cmb_doc_base_dir)
set(cmb_doc_dir "${cmb_package}/${program}.app/${cmb_doc_base_dir}")
endif ()
# Install PDF guides.
cmb_install_extra_data()
endforeach () endforeach ()
# FIXME: Install inside of each application? # FIXME: Install inside of each application?
......
include(hydrology.bundle.common)
set(cmb_package "CMB-Hydro ${cmb_version_major}.${cmb_version_minor}.${cmb_version_patch}")
include(cmb.bundle.apple)
include(modelbuilder.bundle.common) include(modelbuilder.bundle.common)
set(cmb_package "ModelBuilder ${cmb_version_major}.${cmb_version_minor}.${cmb_version_patch}") set(cmb_package "modelbuilder ${cmb_version_major}.${cmb_version_minor}.${cmb_version_patch}")
set(cmb_doc_base_dir "Contents/doc")
include(cmb.bundle.apple) include(cmb.bundle.apple)
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")
include("${CMAKE_CURRENT_LIST_DIR}/../opencv.cmake")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "8.0.0")
superbuild_apply_patch(opencv coreimage-videoio-link
"Remove CoreImage from videoio's linkline")
endif ()
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
diff --git a/modules/videoio/CMakeLists.txt b/modules/videoio/CMakeLists.txt
index 413b3cd..3b4150b 100644
--- a/modules/videoio/CMakeLists.txt
+++ b/modules/videoio/CMakeLists.txt
@@ -173,7 +173,7 @@ if(HAVE_AVFOUNDATION)
list(APPEND VIDEOIO_LIBRARIES "-framework AVFoundation" "-framework QuartzCore")
else()
list(APPEND videoio_srcs ${CMAKE_CURRENT_LIST_DIR}/src/cap_avfoundation_mac.mm)
- list(APPEND VIDEOIO_LIBRARIES "-framework Cocoa" "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreImage" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore")
+ list(APPEND VIDEOIO_LIBRARIES "-framework Cocoa" "-framework Accelerate" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreMedia" "-framework CoreVideo" "-framework QuartzCore")
endif()
endif()
superbuild_add_project(shiboken
DEPENDS qt4 python
CMAKE_ARGS
-DDISABLE_DOCSTRINGS:BOOL=ON)
...@@ -9,4 +9,4 @@ superbuild_add_project(cgm ...@@ -9,4 +9,4 @@ superbuild_add_project(cgm
-DUSE_MPI:BOOL=OFF) -DUSE_MPI:BOOL=OFF)
superbuild_add_extra_cmake_args( superbuild_add_extra_cmake_args(
"-DCGM_DIR=<INSTALL_DIR>/lib/cmake/CGM") "-DCGM_DIR:PATH=<INSTALL_DIR>/lib/cmake/CGM")
...@@ -4,35 +4,27 @@ include(cmb-version) ...@@ -4,35 +4,27 @@ include(cmb-version)
include(paraview-version) include(paraview-version)
set(CPACK_PACKAGE_VENDOR "Kitware, Inc.") set(CPACK_PACKAGE_VENDOR "Kitware, Inc.")
set(CPACK_RESOURCE_FILE_LICENSE
"${superbuild_source_directory}/License.txt")
set(CPACK_PACKAGE_VERSION_MAJOR ${cmb_version_major}) set(CPACK_PACKAGE_VERSION_MAJOR ${cmb_version_major})
set(CPACK_PACKAGE_VERSION_MINOR ${cmb_version_minor}) set(CPACK_PACKAGE_VERSION_MINOR ${cmb_version_minor})
if (cmb_version_suffix) set(CPACK_PACKAGE_VERSION_PATCH ${cmb_version_patch}${cmb_version_suffix})
set(CPACK_PACKAGE_VERSION_PATCH ${cmb_version_patch}-${cmb_version_suffix}) if (CMB_PACKAGE_SUFFIX)
else() set(CPACK_PACKAGE_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH}-${CMB_PACKAGE_SUFFIX})
set(CPACK_PACKAGE_VERSION_PATCH ${cmb_version_patch}) endif ()
endif()
SET(CPACK_PACKAGE_INSTALL_DIRECTORY if (NOT DEFINED package_filename)
"${cmb_package_name} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") set(package_filename "${CMB_PACKAGE_FILE_NAME}")
set(CPACK_SOURCE_PACKAGE_FILE_NAME endif ()
"${cmb_package_name}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
if(NOT DEFINED CPACK_SYSTEM_NAME) if (package_filename)
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}) set(CPACK_PACKAGE_FILE_NAME "${package_filename}")
endif() else ()
if(${CPACK_SYSTEM_NAME} MATCHES Windows)
if(CMAKE_CL_64)
set(CPACK_SYSTEM_NAME win64)
else(CMAKE_CL_64)
set(CPACK_SYSTEM_NAME win32)
endif()
endif()
if(NOT DEFINED CPACK_PACKAGE_FILE_NAME)
set(CPACK_PACKAGE_FILE_NAME set(CPACK_PACKAGE_FILE_NAME
"${CPACK_SOURCE_PACKAGE_FILE_NAME}-${CPACK_SYSTEM_NAME}") "${cmb_package_name}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
endif() endif ()
# Set the license file.
set(CPACK_RESOURCE_FILE_LICENSE
"${superbuild_source_directory}/License.txt")
list(SORT cmb_programs_to_install) list(SORT cmb_programs_to_install)
list(REMOVE_DUPLICATES cmb_programs_to_install) list(REMOVE_DUPLICATES cmb_programs_to_install)
...@@ -59,48 +51,92 @@ if (cmb_install_paraview_python) ...@@ -59,48 +51,92 @@ if (cmb_install_paraview_python)
pvpython) pvpython)
endif () endif ()
set(cmb_plugins_smtk # Currently, ModelBuilder is predominantly ParaView + a suite of plugins from
smtkDiscreteSessionPlugin # SMTK. As the latest iteration of ModelBuilder developed, we encountered
smtkExodusSessionPlugin # inconsistencies during development & packaging with the automatic inclusion of
smtkPolygonSessionPlugin # SMTK's plugins. As a workaround, we created a library in SMTK named
smtkRemoteSessionPlugin # "smtkDefaultPlugins" that links against the plugins SMTK has been configured
smtkRemusMeshOperatorPlugin) # to build and exposes methods for programatically setting them up in
# ModelBuilder.
if (cgm_enabled) #
list(APPEND cmb_plugins_smtk # When ModelBuilder links against smtkDefaultPlugins, the packager treats
smtkCGMSessionPlugin) # smtkDefaultPlugins' dependent libraries (the plugins) as libraries and
endif () # puts them with the rest of the libraries. The code below is a hand-maintained
# whitelist of SMTK's plugins; the packager treats these as plugins and puts
# them in a plugins directory. When the packager comes across a plugin that is
# also linked as a library, it gets confused and installs it into both the
# library and plugin directories, but only fixes the runtime paths for the
# copy in the plugin directory.
#
# SMTK's ability to create a library that links its plugins into a consuming
# application is currently less fault-prone than ParaView's default plugin
# system. Future updates to ParaView may obviate the need for this ability,
# however. Until then, we disable the following logic for SMTK's plugins.
set(LINK_TO_PLUGINS True)
if (NOT ${LINK_TO_PLUGINS})
set(cmb_plugins_smtk
smtkAttributePlugin
smtkDelaunayPlugin
smtkDiscreteSessionPlugin
smtkMeshPlugin
smtkMeshSessionPlugin
smtkModelPlugin
smtkOpenCVPlugin
smtkOperationPlugin
smtkPQComponentsPlugin
smtkPQOperationViewsPlugin
smtkPVServerExtPlugin
smtkPolygonSessionPlugin
smtkRemusMeshOperationPlugin
smtkVTKOperationsPlugin
)
if (cgm_enabled)
list(APPEND cmb_plugins_smtk
smtkCGMSessionPlugin)
endif ()
if (matplotlib_enabled)
list(APPEND cmb_plugins_smtk
smtkMatplotlibPlugin)
endif ()
if (vxl_enabled)
list(APPEND cmb_plugins_smtk
smtkVXLOperationViewsPlugin)
endif ()
endif()
set(cmb_plugins_cmb set(cmb_plugins_cmb
CMB_Plugin cmbPostProcessingModePlugin
ModelBridge_Plugin) )
set(cmb_plugins_all set(cmb_plugins_all
${cmb_plugins_smtk} ${cmb_plugins_smtk}
${cmb_plugins_cmb}) ${cmb_plugins_cmb})
set(cmb_plugins_ModelBuilder set(cmb_plugins_modelbuilder
#${cmb_plugins_cmb} # Autoloaded #${cmb_plugins_cmb} # Autoloaded
${cmb_plugins_smtk}) ${cmb_plugins_smtk})
set(cmb_plugins_paraview set(cmb_plugins_paraview)
CMB_Plugin)
set(cmb_python_modules set(cmb_python_modules
smtk smtk
shiboken
paraview paraview
cinema_python
pygments pygments
six six
vtk) vtk
vtkmodules)
if (numpy_enabled) if (matplotlib_enabled)
list(APPEND cmb_python_modules list(APPEND cmb_python_modules
numpy) matplotlib)
endif () endif ()
if (opencv_enabled) if (numpy_enabled)
list(APPEND cmb_python_modules list(APPEND cmb_python_modules
cv2) numpy)
endif () endif ()
if (pythongirderclient_enabled) if (pythongirderclient_enabled)
...@@ -108,3 +144,67 @@ if (pythongirderclient_enabled) ...@@ -108,3 +144,67 @@ if (pythongirderclient_enabled)
requests requests
girder_client) girder_client)
endif () endif ()
if (paraviewweb_enabled)
list(APPEND cmb_python_modules
autobahn
constantly
incremental
twisted
wslink
zope)
if (WIN32)
list(APPEND cmb_python_modules
adodbapi
isapi
pythoncom
win32com)
endif ()
endif ()
if (qt5_enabled)
include(qt5.functions)
set(qt5_plugin_prefix)
if (NOT WIN32)
set(qt5_plugin_prefix "lib")
endif ()
set(qt5_plugins
sqldrivers/${qt5_plugin_prefix}qsqlite)
if (WIN32)
list(APPEND qt5_plugins
platforms/qwindows)
elseif (APPLE)
list(APPEND qt5_plugins
platforms/libqcocoa
printsupport/libcocoaprintersupport)
elseif (UNIX)
list(APPEND qt5_plugins
platforms/libqxcb
platforminputcontexts/libcomposeplatforminputcontextplugin
xcbglintegrations/libqxcb-glx-integration)
endif ()
superbuild_install_qt5_plugin_paths(qt5_plugin_paths ${qt5_plugins})
else ()
set(qt5_plugin_paths)
endif ()
function (cmb_install_pdf project filename)
if (${project}_enabled)
install(
FILES "${superbuild_install_location}/doc/${filename}"
DESTINATION "${cmb_doc_dir}"
COMPONENT superbuild)
endif ()
endfunction ()
function (cmb_install_extra_data)
if (cmb_doc_dir)
cmb_install_pdf(cmbusersguide "CMBUsersGuide.pdf")
cmb_install_pdf(smtkusersguide "SMTKUsersGuide.pdf")
endif ()
endfunction ()
set(paraview_dir ${CMAKE_CURRENT_BINARY_DIR}/paraview/build) set(cmb_extra_optional_dependencies)
set(vtk_dir ${paraview_dir}/VTK) if (USE_NONFREE_COMPONENTS)
list(APPEND cmb_extra_optional_dependencies
if (__BUILDBOT_INSTALL_LOCATION) triangle)
set(paraview_dir <INSTALL_DIR>/lib/cmake/paraview-${paraview_version})
set(vtk_dir <INSTALL_DIR>/lib/cmake/paraview-${paraview_version})
endif () endif ()
set(CMB_TEST_DATA_ROOT "" CACHE PATH "Location of CMB's testing data") set(cmb_test_plugin_dir lib)
if (WIN32)
set(cmb_test_plugin_dir bin)
endif()
set(smtk_libdir lib) set(cmb_response_file)
if (WIN32) if (WIN32)
set(smtk_libdir bin) # Force response file usage in CMB. The command line gets way too long on
# Windows without this. Once VTK_USE_FILE and PARAVIEW_USE_FILE are gone,
# this can be removed again.
set(cmb_response_file -DCMAKE_NINJA_FORCE_RESPONSE_FILE:BOOL=ON)
endif () endif ()
set(cmb_extra_optional_dependencies) set(cmb_extra_cmake_args)
if (USE_NONFREE_COMPONENTS) if (UNIX AND NOT APPLE)
list(APPEND cmb_extra_optional_dependencies list(APPEND cmb_extra_cmake_args
triangle) -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=FALSE)
endif () endif ()
get_property(cmb_lfs_steps GLOBAL
PROPERTY cmb_superbuild_lfs_steps)
include(smtk.deps)
superbuild_add_project(cmb superbuild_add_project(cmb
DEVELOPER_MODE DEVELOPER_MODE
DEBUGGABLE DEBUGGABLE
DEFAULT_ON DEFAULT_ON
DEPENDS boost remus vxl kml gdal qt4 python paraview shiboken INDEPENDENT_STEP_TARGETS ${cmb_lfs_steps} download update
cmbworkflows zeromq opencv DEPENDS python paraview pybind11 qt qt5 cmbworkflows cmbusersguide smtk
smtk # XXX(smtk): until the submodule works properly ${smtk_dependencies} smtkusersguide
DEPENDS_OPTIONAL moab smtk ${cmb_extra_optional_dependencies} DEPENDS_OPTIONAL ${cmb_extra_optional_dependencies} ${smtk_optional_dependencies}
cxx11
CMAKE_ARGS CMAKE_ARGS
${extra_cmake_args} ${cmb_extra_cmake_args}
-DKML_DIR:PATH=<INSTALL_DIR> -DKML_DIR:PATH=<INSTALL_DIR>
-DGDAL_DIR:PATH=<INSTALL_DIR> -DGDAL_DIR:PATH=<INSTALL_DIR>
-DParaView_DIR:PATH=${paraview_dir}
-DVTK_DIR:PATH=${vtk_dir}
-DCMB_TEST_DATA_ROOT:PATH=${CMB_TEST_DATA_ROOT} -DCMB_TEST_DATA_ROOT:PATH=${CMB_TEST_DATA_ROOT}
-DPARAVIEW_QT_VERSION:STRING=${qt_version}
#specify semi-colon separated paths for session plugins #specify semi-colon separated paths for session plugins
-DCMB_TEST_PLUGIN_PATHS:STRING=<INSTALL_DIR>/${smtk_libdir} -Dcmb_test_plugin_paths:STRING=<INSTALL_DIR>/${cmb_test_plugin_dir}
#specify what mesh workers we should build #specify what mesh workers we should build
-DBUILD_TRIANGLE_MESH_WORKER:BOOL=${triangle_enabled} -DBUILD_TRIANGLE_MESH_WORKER:BOOL=${triangle_enabled}
...@@ -49,13 +56,58 @@ superbuild_add_project(cmb ...@@ -49,13 +56,58 @@ superbuild_add_project(cmb
# session may only be needed for debugging purpose # session may only be needed for debugging purpose
-DSMTK_ENABLE_MOAB_DISCRETE_READER:BOOL=OFF -DSMTK_ENABLE_MOAB_DISCRETE_READER:BOOL=OFF
-DSMTK_ENABLE_OPENCV:BOOL=${opencv_enabled}
-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
-DSMTK_ENABLE_REMUS_SUPPORT:BOOL=ON
-DSMTK_ENABLE_PYTHON_WRAPPING:BOOL=${smtk_enable_python_wrapping}
-DSMTK_ENABLE_VXL_SUPPORT:BOOL=${vxl_enabled}
-DSMTK_USE_PYBIND11:BOOL=ON
-DSMTK_QT_VERSION:STRING=5
-DSMTK_DATA_DIR:PATH=${CMB_TEST_DATA_ROOT}
-DSMTK_USE_SYSTEM_MOAB:BOOL=${moab_enabled} -DSMTK_USE_SYSTEM_MOAB:BOOL=${moab_enabled}
-DMOAB_INCLUDE_DIR:PATH=<INSTALL_DIR>/include -DMOAB_INCLUDE_DIR:PATH=<INSTALL_DIR>/include
# SMTK bits # SMTK bits
-DUSE_SYSTEM_SMTK:BOOL=${smtk_enabled} -DUSE_SYSTEM_SMTK:BOOL=${smtk_enabled}
-DENABLE_HDF5:BOOL=${hdf5_enabled} -DENABLE_HDF5:BOOL=${hdf5_enabled}
-DENABLE_NETCDF:BOOL=${netcdf_enabled}
-DNETCDF_ROOT:PATH=<INSTALL_DIR>
# Cumulus bits
-DSMTK_ENABLE_CUMULUS_SUPPORT:BOOL=${cumulus_enabled}
-DENABLE_Cumulus:BOOL=${cumulus_enabled}
-DCMB_SUPERBUILD_DEVELOPER_ROOT:PATH=<INSTALL_DIR> -DCMB_SUPERBUILD_DEVELOPER_ROOT:PATH=<INSTALL_DIR>
-DCMAKE_INSTALL_LIBDIR:STRING=${smtk_libdir}) # Set CMAKE_INSTALL_LIBDIR to "lib" for all projects in the superbuild to
# override OS-specific libdirs that GNUInstallDirs.cmake would otherwise
# set.
-DCMAKE_INSTALL_LIBDIR:STRING=lib
${cmb_response_file})
if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0") OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.5"))
superbuild_append_flags(cxx_flags "-Wno-inconsistent-missing-override" PROJECT_ONLY)
endif ()
set(cmb_can_lfs FALSE)
if (cmb_SOURCE_SELECTION STREQUAL "git")
set(cmb_can_lfs TRUE)
elseif (cmb_SOURCE_SELECTION STREQUAL "source")
if (EXISTS "${cmb_SOURCE_DIR}/.git")
set(cmb_can_lfs TRUE)
endif ()
endif ()
option(cmb_FETCH_LFS "Fetch LFS data for CMB" OFF)
if (cmb_enabled AND cmb_can_lfs AND cmb_FETCH_LFS)
cmb_superbuild_add_lfs_steps(cmb)
endif ()
# Set suffix to be used for generating archives. This ensures that the package
# files have decent names that we can directly upload to the website.
set(package_suffix_items)
if (APPLE)
list(APPEND package_suffix_items
"OSX${CMAKE_OSX_DEPLOYMENT_TARGET}")
else ()
list(APPEND package_suffix_items
"${CMAKE_SYSTEM_NAME}")
endif ()
if (superbuild_is_64bit)
list(APPEND package_suffix_items
"64bit")
else ()
list(APPEND package_suffix_items
"32bit")
endif()
string(REPLACE ";" "-" package_suffix_default "${package_suffix_items}")
# CMB_PACKAGE_SUFFIX: A string that can be set to the suffix you want to use
# for all the generated packages. By default, it is determined by the features
# enabled.
set(CMB_PACKAGE_SUFFIX "<default>"
CACHE STRING "String to use as a suffix for generated packages")
mark_as_advanced(CMB_PACKAGE_SUFFIX)
if (NOT CMB_PACKAGE_SUFFIX OR CMB_PACKAGE_SUFFIX STREQUAL "<default>")
set(CMB_PACKAGE_SUFFIX "${package_suffix_default}")
elseif (NOT CMB_PACKAGE_SUFFIX STREQUAL package_suffix_default)
message(WARNING "The suffix for the package (${CMB_PACKAGE_SUFFIX}) does not "
"match the suggested suffix based on build options "
"(${package_suffix_default}). Set it to '<default>' or "
"an empty string to use the default suffix. Using the "
"provided suffix.")
endif ()
cmb_superbuild_add_pdf(cmbusersguide CMBUsersGuide.pdf)
superbuild_add_dummy_project(cumulus
DEPENDS pythongirderclient pythonrequests pythonsetuptools pythonsix
)
superbuild_add_project(eigen
DEPENDS cxx11)
...@@ -11,6 +11,15 @@ superbuild_add_project(gdal ...@@ -11,6 +11,15 @@ superbuild_add_project(gdal
-DGDAL_ENABLE_FRMT_MEM:BOOL=ON -DGDAL_ENABLE_FRMT_MEM:BOOL=ON
-DOGR_ENABLE_MEM:BOOL=ON) -DOGR_ENABLE_MEM:BOOL=ON)
superbuild_apply_patch(gdal no-sqlite
"Disable sqlite support in GML")
superbuild_apply_patch(gdal lt_objdir-warning
"Fix warning about LT_OBJDIR redefinition")
superbuild_apply_patch(gdal no-geos
"Skip GEOS and Armadillo support")
superbuild_apply_patch(gdal pointer-comparison
"Fix illegal pointer comparisons")
if (APPLE) if (APPLE)
set(gdal_lib <INSTALL_DIR>/lib/libgdal111.dylib) set(gdal_lib <INSTALL_DIR>/lib/libgdal111.dylib)
elseif (WIN32) elseif (WIN32)
......
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"CMB Tools for Hydrologigal Simulations")
set(CPACK_PACKAGE_NAME "CMB")
set(cmb_package_name "CMB-Hydro")
set(cmb_programs_to_install
#GeologyBuilder
SceneBuilder
ModelBuilder
MeshViewer
PointsBuilder
paraview)
set(cmb_install_paraview_server TRUE)
set(cmb_install_paraview_python TRUE)
include(cmb.bundle.common)
superbuild_add_project(kml
DEPENDS_OPTIONAL cxx11
CMAKE_ARGS
-DBUILD_SHARED_LIBS=OFF)
superbuild_add_project(moab superbuild_add_project(moab
DEPENDS hdf5 netcdf DEPENDS eigen hdf5 netcdf
DEPENDS_OPTIONAL cxx11 DEPENDS_OPTIONAL cxx11
#cgm #cgm
CMAKE_ARGS CMAKE_ARGS
-Wno-dev
-DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF
-DCMAKE_CXX_VISIBILITY_PRESET:STRING=hidden
-DCMAKE_VISIBILITY_INLINES_HIDDEN:BOOL=ON
-DENABLE_BLASLAPACK:BOOL=OFF
-DMOAB_HAVE_EIGEN:BOOL=ON
-DMOAB_USE_SZIP:BOOL=ON -DMOAB_USE_SZIP:BOOL=ON
-DMOAB_USE_CGM:BOOL=OFF -DMOAB_USE_CGM:BOOL=OFF
-DMOAB_USE_CGNS:BOOL=OFF -DMOAB_USE_CGNS:BOOL=OFF
...@@ -11,5 +16,18 @@ superbuild_add_project(moab ...@@ -11,5 +16,18 @@ superbuild_add_project(moab
-DMOAB_USE_HDF:BOOL=ON -DMOAB_USE_HDF:BOOL=ON
-DENABLE_HDF5:BOOL=ON # also required to get hdf5 support enabled -DENABLE_HDF5:BOOL=ON # also required to get hdf5 support enabled
-DMOAB_USE_NETCDF:BOOL=ON -DMOAB_USE_NETCDF:BOOL=ON
-DENABLE_NETCDF:BOOL=ON # also required to get ncdf/exodus enabled
-DNETCDF_ROOT:PATH=<INSTALL_DIR> -DNETCDF_ROOT:PATH=<INSTALL_DIR>
-DMOAB_ENABLE_TESTING:BOOL=ON) # build can't handle this being disabled -DMOAB_ENABLE_TESTING:BOOL=ON) # build can't handle this being disabled
superbuild_apply_patch(moab disable-fortran
"Disable use of fortran")
superbuild_apply_patch(moab export-include-dir
"Set MOAB and iMesh targets to export their installed include directories")
# By default, linux and os x cmake looks in <INSTALL_DIR>/lib/cmake for
# things. On windows, it does not. So, we set MOAB_DIR to point to the
# location of MOABConfig.cmake for everyone.
superbuild_add_extra_cmake_args(
-DMOAB_DIR:PATH=<INSTALL_DIR>/lib/cmake/MOAB)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY set(CPACK_PACKAGE_DESCRIPTION_SUMMARY
"CMB ModelBuilder Application") "CMB modelbuilder application")
set(CPACK_PACKAGE_NAME "CMB") set(CPACK_PACKAGE_NAME "CMB")
set(cmb_package_name "ModelBuilder") set(cmb_package_name "modelbuilder")
set(cmb_programs_to_install set(cmb_programs_to_install
ModelBuilder) modelbuilder
TemplateEditor)
set(cmb_install_paraview_server FALSE) set(cmb_install_paraview_server FALSE)
set(cmb_install_paraview_python TRUE) set(cmb_install_paraview_python TRUE)
......
# Build and install:
superbuild_add_project(nlohmannjson
DEPENDS cxx11
CMAKE_ARGS
-DENABLE_TESTING:BOOL=OFF
-DBuildTests:BOOL=OFF
)
# Provide our location to dependent projects:
superbuild_add_extra_cmake_args(
-Dnlohmann_json_DIR:PATH=<INSTALL_DIR>/lib/cmake/nlohmann_json
)
set(opencv_args)
if (numpy_built_by_superbuild)
if (WIN32)
set(opencv_numpy_include_dir <INSTALL_DIR>/bin/Lib/site-packages/numpy/core/include)
else ()
set(opencv_numpy_include_dir <INSTALL_DIR>/lib/python2.7/site-packages/numpy/core/include)
endif ()
list(APPEND opencv_args
-DPYTHON2_NUMPY_INCLUDE_DIRS:PATH=${opencv_numpy_include_dir})
endif ()
superbuild_add_project(opencv superbuild_add_project(opencv
DEPENDS DEFAULT_ON
python qt4 opencvcontrib numpy DEPENDS python numpy
CMAKE_ARGS CMAKE_ARGS
-DOPENCV_EXTRA_MODULES_PATH:PATH=${CMAKE_CURRENT_BINARY_DIR}/opencvcontrib/src/modules -DBUILD_PERF_TESTS:BOOL=OFF
-DBUILD_TESTS:BOOL=OFF
-DBUILD_opencv_flann:BOOL=OFF
-DBUILD_opencv_hdf:BOOL=OFF -DBUILD_opencv_hdf:BOOL=OFF
-DBUILD_opencv_dnn:BOOL=OFF -DBUILD_opencv_dnn:BOOL=OFF
-DBUILD_opencv_videoio:BOOL=OFF
-DWITH_CUDA:BOOL=OFF -DWITH_CUDA:BOOL=OFF
-DWITH_GTK:BOOL=OFF
-DWITH_FFMPEG:BOOL=OFF
-DWITH_VTK:BOOL=OFF -DWITH_VTK:BOOL=OFF
-DOpenCV_INSTALL_BINARIES_PREFIX:STRING= -DBUILD_opencv_highgui=OFF
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib) -DWITH_QT=OFF
-DCMAKE_INSTALL_NAME_DIR:PATH=<INSTALL_DIR>/lib
${opencv_args})
if (WIN32)
superbuild_add_extra_cmake_args(
-DOpenCV_DIR:PATH=<INSTALL_DIR>/share)
endif ()
superbuild_add_project(opencvcontrib
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
"")
...@@ -12,7 +12,6 @@ set(paraview_disable_plugins ...@@ -12,7 +12,6 @@ set(paraview_disable_plugins
PacMan PacMan
StreamingParticles StreamingParticles
SierraPlotTools SierraPlotTools
SLACTools
UncertaintyRendering UncertaintyRendering
SurfaceLIC SurfaceLIC
EyeDomeLighting EyeDomeLighting
...@@ -23,15 +22,19 @@ foreach (plugin IN LISTS paraview_disable_plugins) ...@@ -23,15 +22,19 @@ foreach (plugin IN LISTS paraview_disable_plugins)
-DPARAVIEW_BUILD_PLUGIN_${plugin}:BOOL=FALSE) -DPARAVIEW_BUILD_PLUGIN_${plugin}:BOOL=FALSE)
endforeach () endforeach ()
set(paraview_enable_plugins
SLACTools
)
foreach (plugin in LISTS paraview_enable_plugins)
list(APPEND paraview_extra_cmake_args
-DPARAVIEW_BUILD_PLUGIN_${plugin}:BOOL=TRUE)
endforeach()
if (APPLE) if (APPLE)
list(APPEND paraview_extra_cmake_args list(APPEND paraview_extra_cmake_args
# We are having issues building mpi4py with Python 2.6 on Mac OSX. Hence, # We are having issues building mpi4py with Python 2.6 on Mac OSX. Hence,
# disable it for now. # disable it for now.
-DPARAVIEW_USE_SYSTEM_MPI4PY:BOOL=ON -DPARAVIEW_USE_SYSTEM_MPI4PY:BOOL=ON)
# We set the VTK_REQUIRED_OBJCXX_FLAGS to nothing to work around the fact
# that the current version of vtk tries to enable objc garbage collection
# which has been removed in XCode 5
-DVTK_REQUIRED_OBJCXX_FLAGS:STRING=)
endif () endif ()
if (UNIX AND NOT APPLE) if (UNIX AND NOT APPLE)
...@@ -45,41 +48,53 @@ if (__BUILDBOT_INSTALL_LOCATION) ...@@ -45,41 +48,53 @@ if (__BUILDBOT_INSTALL_LOCATION)
-DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON) -DPARAVIEW_DO_UNIX_STYLE_INSTALLS:BOOL=ON)
endif () endif ()
list(APPEND paraview_extra_cmake_args # Add mandatory plugins:
-DPARAVIEW_EXTRA_EXTERNAL_PLUGINS:STRING=CMB_Plugin) # list(APPEND paraview_extra_cmake_args
# -DPARAVIEW_EXTRA_EXTERNAL_PLUGINS:STRING=CMB_Plugin)
#this can't be quoted, since that will introduce an extra # Add optional plugins:
#set of quotes into pqparaviewInitializer, and break the build # This can't be quoted, since that will introduce an extra
set(paraview_optional_plugins CMB_Plugin${_superbuild_list_separator}KMLExporter_Plugin) # set of quotes into pqparaviewInitializer, and break the build.
# If you need to add additional plugins to the list, use
# ExtraPlugin${_superbuild_list_separator}KMLExporter_Plugin
# instead of spaces/semicolons:
set(paraview_optional_plugins KMLExporter_Plugin)
superbuild_add_project(paraview superbuild_add_project(paraview
DEBUGGABLE DEBUGGABLE
DEPENDS DEPENDS
boost boost
freetype
gdal gdal
png png
python python
qt4 qt
qt5
zlib zlib
netcdf netcdf
DEPENDS_OPTIONAL DEPENDS_OPTIONAL
cxx11 freetype hdf5 cxx11 hdf5 paraviewweb
CMAKE_ARGS CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON
-DBUILD_TESTING:BOOL=OFF -DBUILD_TESTING:BOOL=OFF
-DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON -DPARAVIEW_BUILD_PLUGIN_CoProcessingScriptGenerator:BOOL=ON
-DPARAVIEW_BUILD_QT_GUI:BOOL=${qt4_enabled} -DPARAVIEW_BUILD_QT_GUI:BOOL=${qt_enabled}
-DPARAVIEW_QT_VERSION:STRING=5
-DPARAVIEW_ENABLE_PYTHON:BOOL=${python_enabled} -DPARAVIEW_ENABLE_PYTHON:BOOL=${python_enabled}
-DPARAVIEW_ENABLE_WEB:BOOL=OFF -DPARAVIEW_ENABLE_WEB:BOOL=OFF
-DPARAVIEW_USE_MPI:BOOL=${mpi_enabled} -DPARAVIEW_USE_MPI:BOOL=${mpi_enabled}
-DVTK_USE_SYSTEM_HDF5:BOOL=${hdf5_enabled} -DVTK_USE_SYSTEM_HDF5:BOOL=${hdf5_enabled}
-DHDF5_NO_FIND_PACKAGE_CONFIG_FILE:BOOL=ON
-DVTK_USE_SYSTEM_NETCDF:BOOL=${netcdf_enabled} -DVTK_USE_SYSTEM_NETCDF:BOOL=${netcdf_enabled}
-DVTK_RENDERING_BACKEND:STRING=OpenGL2 -DVTK_RENDERING_BACKEND:STRING=OpenGL2
-DPARAVIEW_ENABLE_WEB:BOOL=${paraviewweb_enabled}
-DVTK_ENABLE_KITS:BOOL=ON
-DPARAVIEW_USE_ICE_T:BOOL=ON
#currently catalyst is having problems on praxis so lets disable it for now #currently catalyst is having problems on praxis so lets disable it for now
-DPARAVIEW_ENABLE_CATALYST:BOOL=OFF -DPARAVIEW_ENABLE_CATALYST:BOOL=OFF
#CMB needs geovis enabled to provide the kml and gdal readers #CMB needs geovis enabled to provide the gdal reader
-DModule_vtkGeovisCore:BOOL=ON -DModule_vtkGeovisCore:BOOL=ON
-DModule_vtkIOGDAL:BOOL=ON -DModule_vtkIOGDAL:BOOL=ON
-DModule_vtkViewsInfovis:BOOL=ON -DModule_vtkViewsInfovis:BOOL=ON
...@@ -106,5 +121,22 @@ superbuild_add_project(paraview ...@@ -106,5 +121,22 @@ superbuild_add_project(paraview
#If this is true paraview doesn't properly clean the paths to system #If this is true paraview doesn't properly clean the paths to system
#libraries like netcdf #libraries like netcdf
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=TRUE -DCMAKE_INSTALL_RPATH_USE_LINK_PATH:BOOL=TRUE
-DCMAKE_MACOSX_RPATH:BOOL=FALSE
# Keep up with the latest ParaView & VTK by avoiding the use of legacy API
-DVTK_LEGACY_REMOVE:BOOL=TRUE
${paraview_extra_cmake_args}) ${paraview_extra_cmake_args})
if (__BUILDBOT_INSTALL_LOCATION)
set(paraview_paraview_dir <INSTALL_DIR>/lib/cmake/paraview-${paraview_version})
set(paraview_vtk_dir ${paraview_paraview_dir})
else ()
set(paraview_paraview_dir ${CMAKE_CURRENT_BINARY_DIR}/paraview/build)
set(paraview_vtk_dir ${paraview_paraview_dir}/VTK)
endif ()
superbuild_add_extra_cmake_args(
-DParaView_DIR:PATH=${paraview_paraview_dir}
-DParaView_CLEXECUTABLES_DIR:PATH=<INSTALL_DIR>/bin
-DVTK_DIR:PATH=${paraview_vtk_dir})
set(paraviewweb_depends)
if (WIN32)
list(APPEND paraviewweb_depends
pywin32)
endif ()
superbuild_add_dummy_project(paraviewweb
DEPENDS python paraviewwebvisualizer paraviewweblightviz ${paraviewweb_depends})
superbuild_add_project(paraviewweblightviz
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
"${CMAKE_COMMAND}"
-Dsource_location:PATH=<SOURCE_DIR>
-Dinstall_location:PATH=<INSTALL_DIR>
-P "${CMAKE_CURRENT_LIST_DIR}/scripts/paraviewweblightviz.install.cmake")
superbuild_add_project(paraviewwebvisualizer
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
"${CMAKE_COMMAND}"
-Dsource_location:PATH=<SOURCE_DIR>
-Dinstall_location:PATH=<INSTALL_DIR>
-P "${CMAKE_CURRENT_LIST_DIR}/scripts/paraviewwebvisualizer.install.cmake")
diff --git a/cmake/cpl_config.h.cmake b/cmake/cpl_config.h.cmake
index 58feff6..67eaeed 100644
--- a/cmake/cpl_config.h.cmake
+++ b/cmake/cpl_config.h.cmake
@@ -140,10 +140,6 @@
/* For .cpp files, define as const if the declaration of iconv() needs const. */
//#undef ICONV_CPP_CONST
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR "@LT_OBJDIR@"
-
/* Define for Mac OSX Framework build */
#cmakedefine MACOSX_FRAMEWORK
diff -Nr -U5 gdal-98353693d6f1d607954220b2f8b040375e3d1744/alg/CMakeLists.txt gdal-98353693d6f1d607954220b2f8b040375e3d1744.no-geos/alg/CMakeLists.txt
--- gdal-98353693d6f1d607954220b2f8b040375e3d1744/alg/CMakeLists.txt 2016-12-08 12:42:59.000000000 -0500
+++ gdal-98353693d6f1d607954220b2f8b040375e3d1744.no-geos/alg/CMakeLists.txt 2017-04-13 08:39:31.959865767 -0400
@@ -29,20 +29,20 @@
set(LIB_NAME "alg")
project ("lib${LIB_NAME}")
include_directories(${GDAL_ROOT_SOURCE_DIR}/frmts/gtiff)
-find_package(GEOS)
+#find_package(GEOS)
if(GEOS_FOUND)