With macOS there is a long-term struggle with deprecation warnings.
In curl they occur with LDAP, SecureTransport and in docs/examples.
There are three ways to fix them:
- by CFLAGS `-Wno-deprecated-declarations` as a workaround.
- by CFLAGS `-mmacosx-version-min` set to a version where the the
feature was not deprecated.
- by CMake option `-DCMAKE_OSX_DEPLOYMENT_TARGET=`.
In GHA CMake jobs, all three were used, and `-mmacosx-version-min` was
set in a bogus way. Delete that bogus option, and delete the lone,
redundant CMake option too.
In a future commit I might replace the suppression option to properly
setting the target OS.
Follow-up to
dfdd978f7c60224dffe2aac25b436dc0a5cd0186 #13491
Cherry-picked from #14097
runs-on: 'macos-latest'
env:
CC: ${{ matrix.compiler.CC }}
- # '-Wno-deprecated-declarations' required for LDAP and BUILD_EXAMPLES
- CFLAGS: '-DCMAKE_C_FLAGS=-mmacosx-version-min=10.15 -Wno-deprecated-declarations'
+ CFLAGS: '-Wno-deprecated-declarations' # Required for LDAP and BUILD_EXAMPLES
strategy:
fail-fast: false
matrix:
build:
- name: OpenSSL
install: nghttp2 openssl gsasl
- generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCURL_USE_GSASL=ON
+ generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl -DCURL_USE_GSASL=ON
- name: LibreSSL
install: nghttp2 libressl
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DBUILD_EXAMPLES=ON