OpenCV requires C++17, and bundled 3rdparty libraries such as KleidiCV
explicitly request CXX_STANDARD 17. With the CMake Xcode generator,
however, neither the global CMAKE_CXX_STANDARD nor per-target
CXX_STANDARD is emitted as CLANG_CXX_LANGUAGE_STANDARD in the generated
project, so those sources are compiled at the toolchain default
(pre-C++17) and fail, e.g.:
kleidicv/include/kleidicv/traits.h: error: no template named
'is_base_of_v' in namespace 'std'; did you mean 'is_base_of'?
Set CLANG_CXX_LANGUAGE_STANDARD=gnu++17 at the project level via
CMAKE_XCODE_ATTRIBUTE_* in the shared getCMakeArgs(), so every target in
the generated Xcode project (including 3rdparty subprojects) builds with
C++17.
- Remove embed_bitcode parameter from Builder class
- Remove bitcode compilation flags for iOS and Catalyst targets
- Remove BITCODE_GENERATION_MODE from Xcode build commands
- Remove bitcode flags from dynamic library linking
- Remove --embed_bitcode command line argument
- Fix OSXBuilder parameter mismatch after bitcode removal
Bitcode has been deprecated by Apple since Xcode 14 and is no longer
required for App Store submissions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>