Skip to content

Commit

Permalink
COMP: Usage requirements should include language standard
Browse files Browse the repository at this point in the history
Resolves: #3168

This warning should not be possible when using ITK's targets:

ITK-5.3/itkConfigure.h:59:6: warning:
\#warning "WARNING:  The current project is configured to use a C++ standard version older than the C++ standard used for this build of ITK" [-Wcpp]

The CMake targets indicate that at least the same language standard
conformance is required.
  • Loading branch information
hjmjohnson committed Feb 10, 2022
1 parent 107384b commit d6774da
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions CMake/ITKModuleMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -471,16 +471,7 @@ macro(itk_module_add_library _name)
set(_LIBRARY_BUILD_TYPE)
endif()
add_library(${_name} ${_LIBRARY_BUILD_TYPE} ${ARGN})
target_compile_features(${_name} PUBLIC cxx_nullptr
cxx_override
cxx_constexpr
cxx_range_for
cxx_rvalue_references
cxx_static_assert
cxx_strong_enums
cxx_lambdas
cxx_noexcept
cxx_alias_templates )
target_compile_features(${_name} PUBLIC cxx_std_${CMAKE_CXX_STANDARD})
itk_module_link_dependencies()
itk_module_target(${_name})
endmacro()

0 comments on commit d6774da

Please sign in to comment.