]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
ci: avoid `cmake -Hpath`
authorEmanuele Torre <torreemanuele6@gmail.com>
Wed, 15 Jun 2022 18:00:42 +0000 (20:00 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 22 Jun 2022 08:43:07 +0000 (10:43 +0200)
This is an undocumented option similar to the `-Spath' option introduced
in cmake 3.13.
Replace all instances of `-Hpath' with `-Spath' in macos workflow.
Replace `-H. -Bpath' with `mkdir path; cd ./path; cmake ..' in zuul
scripts since it runs an older version of cmake.

Fixes #9008
Closes #9014

.github/workflows/macos.yml
scripts/zuul/before_script.sh
scripts/zuul/script.sh

index cbfed8006e4b1cb34e14e5e2df6a7b95d8bf78ec..6ebd57a410478e1f94cd38ff7012079b5d6ef74a 100644 (file)
@@ -149,7 +149,7 @@ jobs:
 
     - uses: actions/checkout@v3
 
-    - run: cmake -H. -Bbuild -DCURL_WERROR=ON -DPICKY_COMPILER=ON ${{ matrix.build.generate }}
+    - run: cmake -S. -Bbuild -DCURL_WERROR=ON -DPICKY_COMPILER=ON ${{ matrix.build.generate }}
       name: 'cmake generate'
 
     - run: cmake --build build
index 7a386f674aeede2907f20b8eb6ee7518e1253f3a..a40bf6ecf358c844a48e7a85794e90369ef92b1d 100755 (executable)
@@ -76,7 +76,10 @@ if [ "$TRAVIS_OS_NAME" = linux -a "$BORINGSSL" ]; then
   cd $HOME
   git clone --depth=1 https://boringssl.googlesource.com/boringssl
   cd boringssl
-  CXX="g++" CC="gcc" cmake -H. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=1
+  mkdir -p build
+  cd ./build
+  CXX="g++" CC="gcc" cmake .. -GNinja -DCMAKE_BUILD_TYPE=release -DBUILD_SHARED_LIBS=1
+  cd ..
   cmake --build build
   mkdir lib
   cp ./build/crypto/libcrypto.so ./lib/
@@ -84,7 +87,9 @@ if [ "$TRAVIS_OS_NAME" = linux -a "$BORINGSSL" ]; then
   echo "BoringSSL lib dir: "`pwd`"/lib"
   cmake --build build --target clean
   rm -f build/CMakeCache.txt
-  CXX="g++" CC="gcc" cmake -H. -Bbuild -GNinja -DCMAKE_POSITION_INDEPENDENT_CODE=on
+  cd ./build
+  CXX="g++" CC="gcc" cmake .. -GNinja -DCMAKE_POSITION_INDEPENDENT_CODE=on
+  cd ..
   cmake --build build
   export LIBS=-lpthread
 fi
index 11a682081eb3deb0d6f6ebb378e31d7f62d527e3..8a800232e8bbf5c70da390b45aff938d07e0165b 100755 (executable)
@@ -90,7 +90,10 @@ if [ "$T" = "tidy" ]; then
 fi
 
 if [ "$T" = "cmake" ]; then
-  cmake -H. -Bbuild -DCURL_WERROR=ON $C
+  mkdir -p build
+  cd ./build
+  cmake .. -DCURL_WERROR=ON $C
+  cd ..
   cmake --build build
   env TFLAGS="!1139 $TFLAGS" cmake --build build --target test-nonflaky
 fi