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

WIP: Update vxl master #686

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
62 changes: 35 additions & 27 deletions CMake/External_VXL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,32 @@ add_package_dependency(
)

set(VXL_ARGS_CONTRIB
-DBUILD_CONTRIB:BOOL=ON
-DBUILD_RPL:BOOL=ON
-DBUILD_BRL:BOOL=OFF
-DBUILD_MUL_TOOLS:BOOL=OFF
-DBUILD_PRIP:BOOL=OFF
-DVXL_BUILD_CONVERSIONS:BOOL=OFF
-DVXL_BUILD_CONTRIB:BOOL=ON
-DVXL_BUILD_BRL:BOOL=OFF
-DVXL_BUILD_CUL:BOOL=OFF
-DVXL_BUILD_GEL:BOOL=OFF
-DVXL_BUILD_MUL_TOOLS:BOOL=OFF
-DVXL_BUILD_MUL:BOOL=OFF
-DVXL_BUILD_OUL:BOOL=OFF
-DVXL_BUILD_OXL:BOOL=OFF
-DVXL_BUILD_PRIP:BOOL=OFF
-DVXL_BUILD_RPL:BOOL=ON
-DVXL_BUILD_TBL:BOOL=OFF
)

# Handle FFMPEG disable flag
list(APPEND VXL_ARGS_VIDL
-DBUILD_CORE_VIDEO:BOOL=ON
-DVXL_BUILD_CORE_VIDEO:BOOL=ON
)
if(fletch_ENABLE_FFmpeg)
add_package_dependency(
PACKAGE VXL
PACKAGE_DEPENDENCY FFmpeg
)
list(APPEND VXL_ARGS_VIDL
-DWITH_FFMPEG:BOOL=ON
)
else()
list( APPEND VXL_ARGS_VIDL
-DFFMPEG_CONFIG:FILEPATH=IGNORE
Expand Down Expand Up @@ -94,9 +104,9 @@ endif()
set (VXL_patch ${fletch_SOURCE_DIR}/Patches/VXL)
if (EXISTS ${VXL_patch})
set(VXL_PATCH_COMMAND ${CMAKE_COMMAND}
-DVXL_PATCH_DIR:PATH=${VXL_patch}
-DVXL_SOURCE_DIR:PATH=${fletch_BUILD_PREFIX}/src/VXL
-P ${VXL_patch}/Patch.cmake
-DVXL_PATCH_DIR:PATH=${VXL_patch}
-DVXL_SOURCE_DIR:PATH=${fletch_BUILD_PREFIX}/src/VXL
-P ${VXL_patch}/Patch.cmake
)
endif()

Expand All @@ -116,24 +126,20 @@ ExternalProject_Add(VXL
${VXL_ARGS_V3P}
${VXL_EXTRA_CMAKE_CXX_FLAGS}
${COMMON_CMAKE_ARGS}
-DBUILD_EXAMPLES:BOOL=OFF
-DVXL_BUILD_EXAMPLES:BOOL=OFF
-DBUILD_TESTING:BOOL=OFF
-DBUILD_DOCUMENTATION:BOOL=OFF
-DBUILD_FOR_VXL_DASHBOARD:BOOL=ON
-DBUILD_CORE_PROBABILITY:BOOL=ON
-DBUILD_CORE_GEOMETRY:BOOL=ON
-DBUILD_CORE_NUMERICS:BOOL=ON
-DBUILD_CORE_IMAGING:BOOL=ON
-DBUILD_CORE_SERIALISATION:BOOL=ON
-DBUILD_BRL:BOOL=OFF
-DBUILD_GEL:BOOL=OFF
-DBUILD_MUL:BOOL=OFF
-DBUILD_MUL_TOOLS:BOOL=OFF
-DBUILD_TBL:BOOL=OFF
-DVXL_BUILD_DOCUMENTATION:BOOL=OFF
-DVXL_BUILD_CORE_GEOMETRY:BOOL=ON
-DVXL_BUILD_CORE_IMAGING:BOOL=ON
-DVXL_BUILD_CORE_NUMERICS:BOOL=ON
-DVXL_BUILD_CORE_PROBABILITY:BOOL=ON
-DVXL_BUILD_CORE_SERIALISATION:BOOL=ON
-DVXL_BUILD_CORE_UTILITIES:BOOL=ON
-DVXL_USE_DCMTK:BOOL=OFF
-DJPEG_LIBRARY:FILEPATH=${JPEG_LIBRARY}
-DVXL_VIL_INCLUDE_IMAGE_IO:BOOL=ON
-DJPEG_LIBRARY_RELEASE:FILEPATH=${JPEG_LIBRARY}
-DJPEG_INCLUDE_DIR:PATH=${JPEG_INCLUDE_DIR}
-DGEOTIFF_LIBRARY=${libgeotiff_LIBRARY}
-DGEOTIFF_LIBRARY:FILEPATH=${libgeotiff_LIBRARY}
${VXL_EXTRA_BUILD_FLAGS}
)

Expand All @@ -148,9 +154,11 @@ ExternalProject_Add_Step(VXL forcebuild

fletch_external_project_force_install(PACKAGE VXL)

include_directories( SYSTEM ${KWIVER_BUILD_INSTALL_PREFIX}/include/vxl
${KWIVER_BUILD_INSTALL_PREFIX}/include/vxl/vcl
${KWIVER_BUILD_INSTALL_PREFIX}/include/vxl/core )
include_directories(
SYSTEM ${KWIVER_BUILD_INSTALL_PREFIX}/include/vxl
${KWIVER_BUILD_INSTALL_PREFIX}/include/vxl/vcl
${KWIVER_BUILD_INSTALL_PREFIX}/include/vxl/core
)

set(VXL_ROOT "${fletch_BUILD_INSTALL_PREFIX}" CACHE PATH "" FORCE)
set(VXL_DIR "${VXL_ROOT}/share/vxl/cmake" CACHE PATH "" FORCE)
Expand Down
4 changes: 2 additions & 2 deletions CMake/fletch-tarballs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,9 @@ set(VTK_url "http://www.vtk.org/files/release/${VTK_SELECT_VERSION}/VTK-${VTK_ve
list(APPEND fletch_external_sources VTK)

# VXL
set(VXL_version "0bb0ca92867408caec298cef05412ed85c6d56b7")
set(VXL_version "51558266cc28ffb522ae72eebc883a88124a4b6c")
set(VXL_url "https://github.com/vxl/vxl/archive/${VXL_version}.zip")
set(VXL_md5 "287536149942081666a2f9a3be87a666")
set(VXL_md5 "400e55c3687666784597376f1ff4a6f0")
set(VXL_dlname "vxl-${VXL_version}.zip")
list(APPEND fletch_external_sources VXL)

Expand Down
2 changes: 1 addition & 1 deletion Doc/release-notes/master.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Updates since v1.4.1

* Patch VTK 8.2 to fix a compilation issue with gcc 10 in ThridParty/exoduxII
* Patch VTK 8.x to fix a compilation issue with gcc 10.2 where the regex fails to detect the gcc version correctly.

* Update VXL to 51558266cc28ffb522ae72eebc883a88124a4b6c and patch to fix a WIN32 link error.

Updates since v1.4.0
--------------------
Expand Down
14 changes: 10 additions & 4 deletions Patches/VXL/Patch.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@
# External_VXL.cmake for VXL
#-

# fixes a Fortify 'detect' regarding a possible buffer overflow
file(COPY ${VXL_PATCH_DIR}/core/vbl/vbl_array_2d.h
DESTINATION ${VXL_SOURCE_DIR}/core/vbl/
)
)

# fixes an issue with duplicate definition of lrintf() on Windows
file(COPY ${VXL_PATCH_DIR}/v3p/openjpeg2/opj_includes.h
DESTINATION ${VXL_SOURCE_DIR}/v3p/openjpeg2/
)
if (WIN32)
file(COPY ${VXL_PATCH_DIR}/core/vnl/io/CMakeLists.txt
DESTINATION ${VXL_SOURCE_DIR}/core/vnl/io/
)
file(COPY ${VXL_PATCH_DIR}/core/vsl/Templates/vsl_vector_io+char-.cxx
DESTINATION ${VXL_SOURCE_DIR}/core/vsl/Templates/
)
endif()
13 changes: 6 additions & 7 deletions Patches/VXL/core/vbl/vbl_array_2d.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// This is core/vbl/vbl_array_2d.h
#ifndef vbl_array_2d_h_
#define vbl_array_2d_h_
#ifdef VCL_NEEDS_PRAGMA_INTERFACE
#pragma interface
#endif
//:
// \file
// \brief Contains class for a templated 2d array
Expand All @@ -19,8 +16,10 @@

#include <iosfwd>
#include <cstddef>
#include <vcl_compiler.h>
#include <stdint.h>
#ifdef _MSC_VER
# include <vcl_msvc_warnings.h>
#endif

//: simple 2D array
template <class T>
Expand Down Expand Up @@ -145,7 +144,7 @@ class vbl_array_2d

private:
void construct() {
rows_ = VXL_NULLPTR;
rows_ = nullptr;
num_rows_ = 0;
num_cols_ = 0;
}
Expand All @@ -161,7 +160,7 @@ class vbl_array_2d
rows_[i] = p + i * n;
}
else {
rows_ = VXL_NULLPTR;
rows_ = nullptr;
}
}

Expand All @@ -173,7 +172,7 @@ class vbl_array_2d
}
};

VCL_TEMPLATE_EXPORT template <class T>
template <class T>
std::ostream& operator<<(std::ostream &, vbl_array_2d<T> const &);

#define VBL_ARRAY_2D_INSTANTIATE \
Expand Down
40 changes: 40 additions & 0 deletions Patches/VXL/core/vnl/io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# vxl/vnl/io/CMakeLists.txt

set(vnl_io_sources
vnl_io_nonlinear_minimizer.cxx vnl_io_nonlinear_minimizer.h
# vnl_io_real_npolynomial.cxx vnl_io_real_npolynomial.h
# vnl_io_real_polynomial.cxx vnl_io_real_polynomial.h
vnl_io_rational.cxx vnl_io_rational.h
vnl_io_bignum.cxx vnl_io_bignum.h

vnl_io_diag_matrix.hxx vnl_io_diag_matrix.h
vnl_io_matrix.hxx vnl_io_matrix.h
vnl_io_sparse_matrix.hxx vnl_io_sparse_matrix.h
vnl_io_sym_matrix.hxx vnl_io_sym_matrix.h
vnl_io_vector.hxx vnl_io_vector.h
vnl_io_vector_fixed.hxx vnl_io_vector_fixed.h

vnl_io_matrix_fixed.hxx vnl_io_matrix_fixed.h
)

aux_source_directory(Templates vnl_io_sources)

if(CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(
Templates/vsl_vector_io+vcl_vector+vcl_vector+vnl_vector+double----.cxx
PROPERTIES
COMPILE_FLAGS -ftemplate-depth-50)
endif()

vxl_add_library(LIBRARY_NAME ${VXL_LIB_PREFIX}vnl_io
LIBRARY_SOURCES ${vnl_io_sources}
HEADER_INSTALL_DIR vnl/io)
target_link_libraries(${VXL_LIB_PREFIX}vnl_io ${VXL_LIB_PREFIX}vnl ${VXL_LIB_PREFIX}vsl)

if(BUILD_TESTING)
add_subdirectory(tests)
endif()

if (VXL_BUILD_OBJECT_LIBRARIES)
add_library(vnl_io-obj OBJECT ${vnl_io_sources})
endif()
3 changes: 3 additions & 0 deletions Patches/VXL/core/vsl/Templates/vsl_vector_io+char-.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "vsl/vsl_vector_io.hxx"
VSL_VECTOR_IO_INSTANTIATE(char);
VSL_VECTOR_IO_INSTANTIATE(std::vector<char>);
107 changes: 0 additions & 107 deletions Patches/VXL/v3p/openjpeg2/opj_includes.h

This file was deleted.