Skip to content

Conversation

@mattdawkins
Copy link
Member

No description provided.

mattdawkins and others added 2 commits January 8, 2026 15:13
- Change fletch_BUILD_CXX11 option to fletch_BUILD_CXX17 with standard "17"
- Add --extra-cxxflags="-std=c++17" to FFmpeg configure when enabled
- Update OpenCV, VXL, libkml, and pybind11 to use fletch_BUILD_CXX17
- Add VXL patch file for vil_gauss_filter.cxx (original version)
- Add libkml patch file for feature_list.cc (original version)
- Update Patch.cmake files to conditionally apply C++17 patches
- Update README documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- VXL vil_gauss_filter.cxx: Replace deprecated std::bind2nd with lambda
- libkml feature_list.cc: Remove deprecated std::binary_function inheritance

These changes fix compilation errors when building with C++17, where
std::bind2nd and std::binary_function were removed from the standard.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Collaborator

@daniel-riehm daniel-riehm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it makes sense to have C++11 be the standard now that C++17 has superseded it, instead of the default still being C++98. Unless this causes a problem?

endif()

if(fletch_BUILD_CXX17)
list(APPEND FFMPEG_CONFIGURE_COMMAND --extra-cxxflags="-std=c++17")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am confused here - isn't FFmpeg written in C, not C++?

# OpenCV 3.3.0 has an option to enable C++ 11
if (fletch_BUILD_CXX11)
if (fletch_BUILD_CXX17)
list(APPEND OpenCV_EXTRA_BUILD_FLAGS -DENABLE_CXX11:BOOL=ON)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is -DENABLE_CXX11 still correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On older versions, yes, there is no enable 17 so enable 11 is the closest thing and we still want to enable it when using 17

add_custom_target(fletch-build-install)

# Include CXX11 support
set(fletch_CXX_STANDARD_VERSION "98")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set(fletch_CXX_STANDARD_VERSION "98")
set(fletch_CXX_STANDARD_VERSION "11")

Does this seem reasonable?

if (NOT fletch_BUILD_CXX11)
message(FATAL_ERROR "CXX11 must be enabled to use pybind11")
if (NOT fletch_BUILD_CXX17)
message(FATAL_ERROR "CXX17 must be enabled to use pybind11")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe remove this if the default standard is changed from 98 -> 11?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no objections to changing the default to 11 if that doesn't mess up any other projects. I will always use the 17 option so it doesn't matter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants