mirror of
https://github.com/curl/curl.git
synced 2026-04-21 19:12:11 +03:00
- replace `add_compile_options()`, `add_definitions()` with directory properties. To harmonize this across all scripts. The new commands are verbose, but describe better how they work. The syntax is also closer to setting target properties, helps grepping. - prefer `CMAKE_INSTALL_PREFIX` over `--prefix` (in tests, CI). - tidy up cmake invocations. - formatting. Closes #16238
39 lines
1 KiB
Bash
Executable file
39 lines
1 KiB
Bash
Executable file
#!/bin/sh
|
|
# Copyright (C) Viktor Szakats
|
|
#
|
|
# SPDX-License-Identifier: curl
|
|
|
|
set -eu
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
mode="${1:-all}"
|
|
|
|
if [ "${mode}" = 'all' ] || [ "${mode}" = 'FetchContent' ]; then
|
|
rm -rf bld-fetchcontent
|
|
cmake -B bld-fetchcontent \
|
|
-DTEST_INTEGRATION_MODE=FetchContent \
|
|
-DFROM_GIT_REPO="${PWD}/../.." \
|
|
-DFROM_GIT_TAG="$(git rev-parse HEAD)"
|
|
cmake --build bld-fetchcontent
|
|
fi
|
|
|
|
if [ "${mode}" = 'all' ] || [ "${mode}" = 'add_subdirectory' ]; then
|
|
rm -rf curl; ln -s ../.. curl
|
|
rm -rf bld-add_subdirectory
|
|
cmake -B bld-add_subdirectory \
|
|
-DTEST_INTEGRATION_MODE=add_subdirectory
|
|
cmake --build bld-add_subdirectory
|
|
fi
|
|
|
|
if [ "${mode}" = 'all' ] || [ "${mode}" = 'find_package' ]; then
|
|
rm -rf bld-curl
|
|
cmake ../.. -B bld-curl -DCMAKE_INSTALL_PREFIX="${PWD}/bld-curl/_pkg"
|
|
cmake --build bld-curl
|
|
cmake --install bld-curl
|
|
rm -rf bld-find_package
|
|
cmake -B bld-find_package \
|
|
-DTEST_INTEGRATION_MODE=find_package \
|
|
-DCMAKE_PREFIX_PATH="${PWD}/bld-curl/_pkg/lib/cmake/CURL"
|
|
cmake --build bld-find_package
|
|
fi
|