Post

Replies

Boosts

Views

Activity

Suppressing C++ static analyzer in external C++ code?
I am including the glm library in my Xcode project and want to suppress this warning: /opt/extlibs/macosx/include/glm/./ext/../gtc/bitfield.inl:343:15: warning: Although the value stored to 'x' is used in the enclosing expression, the value is never actually read from 'x' [deadcode.DeadStores] uint16 REG2(x >>= 1); ^ ~ Is there a way to do that via a #pragma or a #define or something else in the Build Settings?
0
0
433
Apr ’24
Clang appletvos deployment target
How do you set the deployment target when compiling code for Apple TV? If I use -mios-min-version or -mmacosx-min-version I get: % xcrun --sdk appletvos clang -isysroot $(xcrun --sdk appletvos --show-sdk-path) -mios-version-min=13.0 test.c clang: warning: using sysroot for 'AppleTVOS' but targeting 'iPhone' [-Wincompatible-sysroot] ld: warning: building for iOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS15.0.sdk/usr/lib/libSystem.tbd) built for tvOS ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcache.dylib) built for tvOS ld: warning: building for iOS, but linking in .tbd file (/usr/lib/system/libcommonCrypto.dylib) built for tvOS ... If I leave off the -mios-min-version then the code is compiled for the latest appletvos SDK however I want to target an earlier version: xcrun --sdk appletvos clang -isysroot $(xcrun --sdk appletvos --show-sdk-path) test.c otool -l a.out ... Load command 9      cmd LC_UUID  cmdsize 24     uuid A9538E37-7DB1-3EEE-AD77-FAE9DBA8562D Load command 10       cmd LC_BUILD_VERSION   cmdsize 32  platform 3     minos 15.0       sdk 15.0    ntools 1      tool 3   version 711.0 ... There doesn't appear to be a -mtvos-min-version?
1
0
1.6k
Nov ’21