XCode 12.2 cmake 3.19.1 watchos SDK 7.1 cannot find CXX compiler
Hey hey,
I have same trouble with xcode 12.2, cmake 3.19.1, trying to build for watchos SDK 7.1
cmake ../../source/ -G Xcode -DCMAKE_TOOLCHAIN_FILE="../../ios.toolchain.cmake" -DPLATFORM=$platform -DENABLE_BITCODE=1 \ -DQt5_DIR="/Users/david/Qt/5.15.2/clang_64/lib/cmake/Qt5" \ -DQt5Core_DIR="/Users/david/Qt/5.15.2/clang_64/lib/cmake/Qt5Core" \ -DQt5Positioning_DIR="/Users/david/Qt/5.15.2/clang_64/lib/cmake/Qt5Positioning"
output :
configure WATCHOSCOMBINED watchos
-- Using the default min-version since DEPLOYMENT_TARGET not provided!
-- Enabling ARC support by default. ENABLE_ARC not provided!
-- Hiding symbols visibility by default. ENABLE_VISIBILITY not provided!
-- Using NON-strict compiler checks by default. ENABLE_STRICT_TRY_COMPILE not provided!
-- Using C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Using CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
-- Using libtool: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-- Will combine built (static) artifacts into FAT lib...
-- Not setting any manual command-line buildflags, since Xcode is selected as generator.
-- Configuring watchos build for platform: WATCHOSCOMBINED, architecture(s): armv7k;arm64_32;i386
-- Using SDK: /Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS7.1.sdk
-- Autoconf target triple: aarch64_32-i386-apple-watchos
-- Using minimum deployment version: 2.0 (SDK version: 7.1)
-- Merging integrated CMake 3.14+ iOS,tvOS,watchOS,macOS toolchain(s) with this toolchain!
-- Using Xcode version: 12.2
-- Using a data_ptr size of: 8
-- Using install_name_tool: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool
-- Enabling bitcode support.
-- Enabling ARC support.
-- Hiding symbols (-fvisibility=hidden).
-- Using libtool: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-- Will combine built (static) artifacts into FAT lib...
-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Configuring done
CMake Error in filters/filters/CMakeLists.txt:
No known features for CXX compiler
""
version .
CMake Generate step failed. Build files cannot be regenerated correctly.
as you see,
-- The CXX compiler identification is unknown
only for watchos platform. When i build for ios, it work like a charm. It worked before xcode 12.2
I upgrade cmake to the last version, i see there is the patch on, i google for 2 days, i am lost in the dark, please help :)