Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VTK/vtk-m] Update VTK to 9.0 and add vtk-m #11148

Merged
merged 32 commits into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
850e556
[vtk-m] new port vtk-m
Neumann-A May 3, 2020
06ecd9a
[VTK] Update to 9.0
Neumann-A May 3, 2020
712d265
include local buildtree changes
Neumann-A May 3, 2020
d14828b
[pcl] disable VTK due to API changes in VTK 9.0
Neumann-A May 3, 2020
b8412bc
[vtk-m] add supports field to be only x64
Neumann-A May 3, 2020
5037be5
[vtk-dicom] add python executable.
Neumann-A May 3, 2020
cc62abd
fix vtkm dependency
Neumann-A May 4, 2020
a9879e9
[vtk-dicom] fix missing std:: namespace
Neumann-A May 4, 2020
e9c7079
[vtk-m] add uwp to unsupported triplets
Neumann-A May 4, 2020
be19c64
[vtk] add pegtl include patch, reenable IOMotionFX
Neumann-A May 4, 2020
7f54cda
remove hdf5 changes for testing
Neumann-A May 4, 2020
9dd615d
use different pgetl patch which redirects to the installed config of …
Neumann-A May 4, 2020
487b618
[pegtl-2] version file needs renaming too
Neumann-A May 4, 2020
a173464
[vtk] change dependency to pgetl-2 and fix the patch
Neumann-A May 4, 2020
e602617
[vtk] put in hdf5 fix again and correct manually installed include files
Neumann-A May 4, 2020
9cd771b
remove deprecated function to retrigger CI
Neumann-A May 5, 2020
3972e24
[lz4] correctly lowercase the lz4 config
Neumann-A May 5, 2020
bcd66d0
[vtk] remove unnecessary code
Neumann-A May 5, 2020
a5cf13f
[pegtl-2] add homepage
Neumann-A May 6, 2020
cc7648c
[pegtl] modernize portfiles
Neumann-A May 6, 2020
6bfc20c
[vtk-dicom] add homepage
Neumann-A May 6, 2020
ad6688c
[vtk-dicom] modernize portfile
Neumann-A May 6, 2020
746d82a
[vtk-m] remove empty build depends
Neumann-A May 6, 2020
ffe138f
[vtk] try fixing the permission issue
Neumann-A May 6, 2020
b0dedc8
bump control
Neumann-A May 7, 2020
9ff722b
Update FindHDF5.cmake
Neumann-A May 8, 2020
f9de7c4
Update pegtl.patch
Neumann-A May 8, 2020
bc34aa9
Update ports/vtk/pegtl.patch
Neumann-A May 8, 2020
9786d97
[vtk] refactor portfile, added a few deps on [core] and added feature…
Neumann-A May 9, 2020
462a8c0
[vtk] pegtl.patch: Add additional found message
Neumann-A May 9, 2020
01bb014
[vtk-m] add more documentation comments
Neumann-A May 9, 2020
f3d094e
[vtk] fix string replacement
Neumann-A May 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/lz4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ list(REMOVE_ITEM lz4h "${CMAKE_CURRENT_LIST_DIR}/lib/xxhash.h")
INSTALL(FILES ${lz4h} DESTINATION "${INSTALL_INCLUDE_DIR}")

install(EXPORT lz4Config
FILE lz4Config.cmake
FILE lz4-config.cmake
NAMESPACE lz4::
DESTINATION "${INSTALL_CMAKE_DIR}"
)
Expand Down
2 changes: 1 addition & 1 deletion ports/lz4/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: lz4
Version: 1.9.2-1
Version: 1.9.2-2
Homepage: https://github.com/lz4/lz4
Description: Lossless compression algorithm, providing compression speed at 400 MB/s per core.
Build-Depends: xxhash
2 changes: 1 addition & 1 deletion ports/pcl/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: pcl
Version: 1.9.1-12
Version: 1.9.1-13
Homepage: https://github.com/PointCloudLibrary/pcl
Description: Point Cloud Library (PCL) is open source library for 2D/3D image and point cloud processing.
Build-Depends: eigen3, flann, qhull, vtk, libpng, boost-system, boost-filesystem, boost-thread, boost-date-time, boost-iostreams, boost-random, boost-foreach, boost-dynamic-bitset, boost-property-map, boost-graph, boost-multi-array, boost-signals2, boost-ptr-container, boost-uuid, boost-interprocess, boost-asio
Expand Down
2 changes: 1 addition & 1 deletion ports/pcl/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ vcpkg_configure_cmake(
-DWITH_LIBUSB=OFF
-DWITH_PNG=ON
-DWITH_QHULL=ON
-DWITH_VTK=ON
-DWITH_VTK=OFF # disabled due to API changes in 9.0
# FEATURES
${FEATURE_OPTIONS}
)
Expand Down
3 changes: 2 additions & 1 deletion ports/pegtl-2/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Source: pegtl-2
Version: 2.8.1
Version: 2.8.1-1
Description: The Parsing Expression Grammar Template Library (PEGTL) is a zero-dependency C++ header-only parser combinator library for creating parsers according to a Parsing Expression Grammar (PEG). This version maintains compatibility with C++11.
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
Homepage: https://github.com/taocpp/PEGTL
6 changes: 3 additions & 3 deletions ports/pegtl-2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO taocpp/pegtl
Expand All @@ -25,7 +24,8 @@ vcpkg_fixup_cmake_targets(CONFIG_PATH share/pegtl-2/cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)

# Handle copyright
file(RENAME ${CURRENT_PACKAGES_DIR}/share/pegtl-2/LICENSE ${CURRENT_PACKAGES_DIR}/share/pegtl-2/copyright)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright)

Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
# Handle collision with latest pegtl
file(RENAME ${CURRENT_PACKAGES_DIR}/share/pegtl-2/pegtl-config.cmake ${CURRENT_PACKAGES_DIR}/share/pegtl-2/pegtl-2-config.cmake)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/pegtl-config.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config.cmake)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/pegtl-config-version.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/${PORT}-config-version.cmake)
1 change: 0 additions & 1 deletion ports/pegtl/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include(vcpkg_common_functions)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO taocpp/pegtl
Expand Down
5 changes: 3 additions & 2 deletions ports/vtk-dicom/CONTROL
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Source: vtk-dicom
Version: 0.8.12
Version: 0.8.12-1
Description: DICOM for VTK
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
Build-Depends: vtk, zlib
Homepage: https://github.com/dgobbi/vtk-dicom
Build-Depends: vtk[core], zlib

Feature: gdcm
Description: Use gdcm for decompressing DICOM files.
Expand Down
10 changes: 5 additions & 5 deletions ports/vtk-dicom/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
include(vcpkg_common_functions)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO dgobbi/vtk-dicom
REF 5034c68450de857b70fbe4a4b9f8dddb62badef3 # v0.8.12
SHA512 bad1ed6a4a412402a2cd69e5f85b2b73f1ee7ea46a6bbcac31c5f66d07ae006679ffbd9a3c70f9baa1b05b1af0a2d4ca0efc34ec0a85a92f5116b900e81635cd
HEAD_REF master
PATCHES std.patch # similar patch is already in master
)

if ("gdcm" IN_LIST FEATURES)
Expand All @@ -21,22 +20,23 @@ if(USE_GDCM)
-DUSE_DCMTK=OFF
)
endif()

vcpkg_find_acquire_program(PYTHON3)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBUILD_PROGRAMS=OFF
-DBUILD_EXAMPLES=OFF
"-DPython3_EXECUTABLE=${PYTHON3}"
${ADDITIONAL_OPTIONS}
)

vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

# Handle copyright
file(COPY ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/vtk-dicom)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/Copyright.txt ${CURRENT_PACKAGES_DIR}/share/vtk-dicom/copyright)
file(INSTALL ${SOURCE_PATH}/Copyright.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
74 changes: 74 additions & 0 deletions ports/vtk-dicom/std.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
diff --git a/Source/vtkScancoCTReader.cxx b/Source/vtkScancoCTReader.cxx
index a71f2e46e..afe202ffc 100644
--- a/Source/vtkScancoCTReader.cxx
+++ b/Source/vtkScancoCTReader.cxx
@@ -176,7 +176,7 @@ int vtkScancoCTReader::CheckVersion(const char header[16])
//----------------------------------------------------------------------------
int vtkScancoCTReader::CanReadFile(const char *filename)
{
- ifstream infile(filename, ios::in | ios::binary);
+ std::ifstream infile(filename, ios::in | ios::binary);

bool canRead = false;
if (infile.good())
@@ -409,7 +409,7 @@ void vtkScancoCTReader::StripString(char *dest, const char *cp, size_t l)
}

//----------------------------------------------------------------------------
-int vtkScancoCTReader::ReadISQHeader(ifstream *file, unsigned long bytesRead)
+int vtkScancoCTReader::ReadISQHeader(std::ifstream *file, unsigned long bytesRead)
{
if (bytesRead < 512)
{
@@ -620,7 +620,7 @@ int vtkScancoCTReader::ReadISQHeader(ifstream *file, unsigned long bytesRead)
}

//----------------------------------------------------------------------------
-int vtkScancoCTReader::ReadAIMHeader(ifstream *file, unsigned long bytesRead)
+int vtkScancoCTReader::ReadAIMHeader(std::ifstream *file, unsigned long bytesRead)
{
if (bytesRead < 160)
{
@@ -987,7 +987,7 @@ int vtkScancoCTReader::RequestInformation(
const char *ufilename = filename;
#endif

- ifstream infile(ufilename, ios::in | ios::binary);
+ std::ifstream infile(ufilename, ios::in | ios::binary);
if (!infile.good())
{
vtkErrorMacro("Cannot open file " << filename);
@@ -1115,7 +1115,7 @@ int vtkScancoCTReader::RequestData(
static_cast<unsigned char *>(data->GetScalarPointer());

// open the file
- ifstream infile(filename, ios::in | ios::binary);
+ std::ifstream infile(filename, ios::in | ios::binary);
if (!infile.good())
{
vtkErrorMacro("Cannot open file " << filename);
diff --git a/Source/vtkScancoCTReader.h b/Source/vtkScancoCTReader.h
index ca31d7572..240d532f2 100644
--- a/Source/vtkScancoCTReader.h
+++ b/Source/vtkScancoCTReader.h
@@ -34,6 +34,7 @@
#ifndef vtkScancoCTReader_h
#define vtkScancoCTReader_h

+#include <iosfwd>
#include "vtkImageReader2.h"
#include "vtkDICOMModule.h" // For export macro
#include "vtkDICOMConfig.h" // For configuration details
@@ -185,10 +186,10 @@ protected:
void InitializeHeader();

//! Read an ISQ header.
- int ReadISQHeader(ifstream *file, unsigned long bytesRead);
+ int ReadISQHeader(std::ifstream *file, unsigned long bytesRead);

//! Read AIM header.
- int ReadAIMHeader(ifstream *file, unsigned long bytesRead);
+ int ReadAIMHeader(std::ifstream *file, unsigned long bytesRead);

//! Check the file header to see what type of file it is.
/*!
23 changes: 23 additions & 0 deletions ports/vtk-m/CONTROL
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Source: vtk-m
Version: 1.5.0
Homepage: https://gitlab.kitware.com/vtk/vtk-m/
Description: VTK-m is a toolkit of scientific visualization algorithms for emerging processor architectures.
Supports: x64 & !uwp

Feature: cuda
Description: Use the NVIDIA CUDA device adapter.
Build-Depends: cuda

Feature: omp
Description: Use the OpenMP device adapter.

Feature: tbb
Description: Use the Intel TBB device adapter.
Build-Depends: tbb

Feature: mpi
Description: Use the MPI controller.
Build-Depends: mpi

Feature: double
Description: Use double precision in floating point calculations
61 changes: 61 additions & 0 deletions ports/vtk-m/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# VENDORED DEPENDENCIES!
# TODO: Should be replaced in the future with VCPKG internal versions
# add_subdirectory(thirdparty/diy)
# add_subdirectory(thirdparty/lodepng)
# if(VTKm_ENABLE_LOGGING)
# add_subdirectory(thirdparty/loguru)
# endif()
# add_subdirectory(thirdparty/optionparser)
# add_subdirectory(thirdparty/taotuple)
# add_subdirectory(thirdparty/lcl)
strega-nil marked this conversation as resolved.
Show resolved Hide resolved

vcpkg_check_features (OUT_FEATURE_OPTIONS OPTIONS
FEATURES
cuda VTKm_ENABLE_CUDA
omp VTKm_ENABLE_OPENMP
tbb VTKm_ENABLE_TBB
mpi VTKm_ENABLE_MPI
double VTKm_USE_DOUBLE_PRECISION
)

if("cuda" IN_LIST FEATURES AND NOT ENV{CUDACXX})
set(ENV{CUDACXX} "$ENV{CUDA_PATH}/bin/nvcc")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
message(STATUS "Feature CUDA forces static build!")
endif()
set(VCPKG_LIBRARY_LINKAGE "static") # CUDA forces static build.
endif()

list(APPEND OPTIONS -DVTKm_ENABLE_RENDERING=ON)
list(APPEND OPTIONS -DVTKm_ENABLE_DEVELOPER_FLAGS=OFF)
list(APPEND OPTIONS -DVTKm_ENABLE_CPACK=OFF)
list(APPEND OPTIONS -DVTKm_USE_DEFAULT_TYPES_FOR_VTK=ON)
# For port customizations on unix systems.
# Please feel free to make these port features if it makes any sense
#list(APPEND OPTIONS -DVTKm_ENABLE_GL_CONTEXT=ON) # or
#list(APPEND OPTIONS -DVTKm_ENABLE_EGL_CONTEXT=ON) # or
#list(APPEND OPTIONS -DVTKm_ENABLE_OSMESA_CONTEXT=ON)
list(APPEND OPTIONS -DBUILD_TESTING=OFF)

vcpkg_from_gitlab(GITLAB_URL "https://gitlab.kitware.com"
OUT_SOURCE_PATH SOURCE_PATH
REPO vtk/vtk-m
REF f2aa6ad5be1a97e3fb41ef4680ee2c76c3434ac0 # v1.5.0 Version is strongly locked to VTK 9.0. Upgrading will most likly brake the VTK build
SHA512 2f2a273f74d9a583df9e25a4792440d8d89652fa14b3153f2ea5afbd329b50970e7b9bd68e0ccd036baf5c1f3ad7a8302d95c01dbb30d9a46c045987eebf5370)
# For people only wanting vtk-m and not VTK
#REF 74ffad9bd0679d061bc87e544a728f1c3c926269 # v1.5.1
Neumann-A marked this conversation as resolved.
Show resolved Hide resolved
#SHA512 c9e1c18432b6c11ae086445255acf9477fe4c888122a2b2a9713dc63a40d2e4c2375742157526b5f0869f14c62a4ad66d81ee58d6cc75a1d53a1d615525a03c9)
vcpkg_configure_cmake(SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${OPTIONS})
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/vtkm-1.5 TARGET_PATH share/vtkm)

file(READ ${CURRENT_PACKAGES_DIR}/share/vtkm/VTKmConfig.cmake _contents)
string(REPLACE [[set_and_check(VTKm_CONFIG_DIR "${PACKAGE_PREFIX_DIR}/lib/cmake/vtkm-1.5")]] [[set_and_check(VTKm_CONFIG_DIR "${PACKAGE_PREFIX_DIR}/share/vtkm")]] _contents ${_contents})
file(WRITE ${CURRENT_PACKAGES_DIR}/share/vtkm/VTKmConfig.cmake ${_contents})

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)

file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
26 changes: 21 additions & 5 deletions ports/vtk/CONTROL
Original file line number Diff line number Diff line change
@@ -1,25 +1,41 @@
Source: vtk
Version: 8.2.0-13
Version: 9.0
Description: Software system for 3D computer graphics, image processing, and visualization
Homepage: https://github.com/Kitware/VTK
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5, libjpeg-turbo, proj4, lz4, libtheora, eigen3, double-conversion, pugixml, libharu, sqlite3, netcdf-c
Build-Depends: zlib, libpng, tiff, libxml2, jsoncpp, glew, freetype, expat, hdf5[core], libjpeg-turbo, proj4, lz4, liblzma, libtheora, eigen3, double-conversion, pugixml, libharu[notiffsymbols], sqlite3, netcdf-c, utfcpp, libogg, pegtl-2

Feature: vtkm
Description: Build with vtk-m accelerator and module.
Build-Depends: vtk-m[core]

Feature: openvr
Description: OpenVR functionality for VTK
Build-Depends: sdl2, openvr

Feature: qt
Description: Qt functionality for VTK
Build-Depends: qt5
Build-Depends: qt5-xmlpatterns, qt5-tools, qt5-imageformats, qt5-x11extras (linux)

Feature: mpi
Description: MPI functionality for VTK
Build-Depends: mpi, hdf5[parallel]
Build-Depends: mpi, hdf5[core, parallel], vtk-m[core,mpi]

Feature: python
Description: Python functionality for VTK
Build-Depends: python3

Feature: atlmfc
Description: Mfc functionality for vtk on Windows
Build-Depends: atlmfc (windows)
Build-Depends: atlmfc (windows)

Feature: paraview
Description: Build vtk modules required by paraview
Build-Depends: vtk[core, qt], vtk[core, atlmfc] (windows)

Feature: cuda
Description: Support CUDA compilation
Build-Depends: cuda

Feature: all
Description: Build vtk modules required by paraview
Build-Depends: libmysql, ffmpeg, gdal, vtk[core, qt, python, mpi], vtk[core, atlmfc] (windows)
Loading