mirror of
https://github.com/curl/curl.git
synced 2026-05-17 12:46:24 +03:00
cmake: add BUILD_EXAMPLES option to build examples
You can enable it with `-DBUILD_EXAMPLES=ON`. To match autotools' `make examples` feature. Windows (static) builds not tested. Also enable examples in a pair of CI jobs. Apply related updates to the macOS CI workflow: - drop unused `CXX` envs. - drop no longer needed `-Wno-error=undef -Wno-error=conversion` flags. - pass `-Wno-deprecated-declarations` to GCC too (for `BUILD_EXAMPLES`). - document why `-Wno-deprecated-declarations` is necessary. Closes #13491
This commit is contained in:
parent
c8e0cd1de8
commit
dfdd978f7c
3 changed files with 54 additions and 6 deletions
11
.github/workflows/macos.yml
vendored
11
.github/workflows/macos.yml
vendored
|
|
@ -208,24 +208,23 @@ jobs:
|
|||
cmake:
|
||||
name: cmake ${{ matrix.compiler.CC }} ${{ matrix.build.name }}
|
||||
runs-on: 'macos-latest'
|
||||
env: ${{ matrix.compiler }}
|
||||
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'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler:
|
||||
- CC: clang
|
||||
CXX: clang++
|
||||
CFLAGS: "-mmacosx-version-min=10.15 -Wno-deprecated-declarations"
|
||||
- CC: gcc-12
|
||||
CXX: g++-12
|
||||
CFLAGS: "-mmacosx-version-min=10.15 -Wno-error=undef -Wno-error=conversion"
|
||||
build:
|
||||
- name: OpenSSL
|
||||
install: nghttp2 openssl
|
||||
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9
|
||||
- name: LibreSSL
|
||||
install: nghttp2 libressl
|
||||
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON
|
||||
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/libressl -DCURL_DISABLE_LDAP=ON -DCURL_DISABLE_LDAPS=ON -DBUILD_EXAMPLES=ON
|
||||
- name: libssh2
|
||||
install: nghttp2 openssl libssh2
|
||||
generate: -DOPENSSL_ROOT_DIR=$(brew --prefix)/opt/openssl -DCURL_USE_LIBSSH2=ON -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue