Module: Mesa
Branch: master
Commit: f5269b0b6a8d9ae5d91b68e1b0e2ee0447564cb5
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5269b0b6a8d9ae5d91b68e1b0e2ee0447564cb5

Author: Andres Gomez <[email protected]>
Date:   Mon Nov  9 17:35:46 2020 +0200

ci: specify source and build directories with CMake

The -S and -B flags were officially introduced in CMake 3.13.

Avoids the following warning:

"
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.
"

Signed-off-by: Andres Gomez <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Reviewed-by: Tomeu Vizoso <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6388>

---

 .gitlab-ci.yml                     | 10 +++++-----
 .gitlab-ci/build-apitrace.sh       |  4 ++--
 .gitlab-ci/build-deqp.sh           |  5 ++---
 .gitlab-ci/build-fossilize.sh      |  2 +-
 .gitlab-ci/build-gfxreconstruct.sh |  2 +-
 .gitlab-ci/build-libclc.sh         |  4 ++--
 .gitlab-ci/build-piglit.sh         |  2 +-
 .gitlab-ci/build-renderdoc.sh      |  2 +-
 .gitlab-ci/build-spirv-tools.sh    |  2 +-
 .gitlab-ci/build-vulkantools.sh    |  2 +-
 .gitlab-ci/container/x86_build.sh  |  2 +-
 .gitlab-ci/lava-gitlab-ci.yml      |  2 +-
 12 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4485c922a61..886d153840c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -276,7 +276,7 @@ x86_build:
   extends:
     - .use-x86_build-base
   variables:
-    MESA_IMAGE_TAG: &x86_build "2020-12-11-sanitizers"
+    MESA_IMAGE_TAG: &x86_build "2020-12-16-cmake"
 
 .use-x86_build:
   variables:
@@ -361,13 +361,13 @@ x86_test-base:
 x86_test-gl:
   extends: .use-x86_test-base
   variables:
-    MESA_IMAGE_TAG: &x86_test-gl "2020-12-14-cts"
+    MESA_IMAGE_TAG: &x86_test-gl "2020-12-16-cmake"
 
 # Debian 10 based x86 test image for VK
 x86_test-vk:
   extends: .use-x86_test-base
   variables:
-    MESA_IMAGE_TAG: &x86_test-vk "2020-12-14-cts"
+    MESA_IMAGE_TAG: &x86_test-vk "2020-12-16-cmake"
 
 # Debian 10 based ARM build image
 arm_build:
@@ -407,7 +407,7 @@ arm64_test:
   extends:
     - .use-arm_test-base
   variables:
-    MESA_IMAGE_TAG: &arm64_test "2020-12-14-cts"
+    MESA_IMAGE_TAG: &arm64_test "2020-12-16-cmake"
 
 .use-arm64_test:
   variables:
@@ -421,7 +421,7 @@ armhf_test:
   extends:
     - .use-arm_test-base
   variables:
-    MESA_IMAGE_TAG: &armhf_test "2020-12-14-cts"
+    MESA_IMAGE_TAG: &armhf_test "2020-12-16-cmake"
 
 .use-armhf_test:
   variables:
diff --git a/.gitlab-ci/build-apitrace.sh b/.gitlab-ci/build-apitrace.sh
index f441108f338..78a633c6a43 100644
--- a/.gitlab-ci/build-apitrace.sh
+++ b/.gitlab-ci/build-apitrace.sh
@@ -9,7 +9,7 @@ WAFFLE_VERSION="e3c995d9a2693b687501715b6550619922346089"
 git clone https://gitlab.freedesktop.org/mesa/waffle.git --single-branch 
--no-checkout /waffle
 pushd /waffle
 git checkout "$WAFFLE_VERSION"
-cmake -B_build -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release 
$EXTRA_CMAKE_ARGS .
+cmake -S . -B _build -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release 
$EXTRA_CMAKE_ARGS
 make -C _build install
 mkdir -p build/lib build/bin
 cp _build/lib/libwaffle-1.so build/lib/libwaffle-1.so.0
@@ -26,7 +26,7 @@ git checkout "$APITRACE_VERSION"
 # Note: The cmake stuff for waffle in apitrace fails to use waffle's library
 # directory.  Just force the issue here.
 env LDFLAGS="-L/usr/local/lib" \
-    cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release -DENABLE_GUI=False 
-DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ $EXTRA_CMAKE_ARGS
+    cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release 
-DENABLE_GUI=False -DENABLE_WAFFLE=on -DWaffle_DIR=/usr/local/lib/cmake/Waffle/ 
$EXTRA_CMAKE_ARGS
 ninja -C _build
 mkdir build
 cp _build/apitrace build
diff --git a/.gitlab-ci/build-deqp.sh b/.gitlab-ci/build-deqp.sh
index 34c68b80562..a25df610cad 100644
--- a/.gitlab-ci/build-deqp.sh
+++ b/.gitlab-ci/build-deqp.sh
@@ -23,11 +23,10 @@ cp doc/testlog-stylesheet/testlog.{css,xsl} /deqp
 popd
 
 pushd /deqp
-cmake -G Ninja \
+cmake -S /VK-GL-CTS -B . -G Ninja \
       -DDEQP_TARGET=${DEQP_TARGET:-x11_glx} \
       -DCMAKE_BUILD_TYPE=Release \
-      $EXTRA_CMAKE_ARGS \
-      /VK-GL-CTS
+      $EXTRA_CMAKE_ARGS
 ninja
 
 # Copy out the mustpass lists we want.
diff --git a/.gitlab-ci/build-fossilize.sh b/.gitlab-ci/build-fossilize.sh
index 21a7838a1b6..43a879e988e 100644
--- a/.gitlab-ci/build-fossilize.sh
+++ b/.gitlab-ci/build-fossilize.sh
@@ -8,7 +8,7 @@ git checkout 6b5b570008c9ab5269e341f04c811fe49a1bb72c
 git submodule update --init
 mkdir build
 cd build
-cmake .. -DCMAKE_BUILD_TYPE=Release -G Ninja
+cmake -S .. -B . -G Ninja -DCMAKE_BUILD_TYPE=Release
 ninja -C . install
 cd ../..
 rm -rf Fossilize
diff --git a/.gitlab-ci/build-gfxreconstruct.sh 
b/.gitlab-ci/build-gfxreconstruct.sh
index 3f450184d40..6b79e9a3f26 100644
--- a/.gitlab-ci/build-gfxreconstruct.sh
+++ b/.gitlab-ci/build-gfxreconstruct.sh
@@ -11,7 +11,7 @@ pushd /gfxreconstruct
 git checkout "$GFXRECONSTRUCT_VERSION"
 git submodule update --init
 git submodule update
-cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release
+cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release
 ninja -C _build gfxrecon-replay gfxrecon-info
 mkdir -p build/bin
 install _build/tools/replay/gfxrecon-replay build/bin
diff --git a/.gitlab-ci/build-libclc.sh b/.gitlab-ci/build-libclc.sh
index be12ed841a8..7867d5833af 100644
--- a/.gitlab-ci/build-libclc.sh
+++ b/.gitlab-ci/build-libclc.sh
@@ -8,7 +8,7 @@ $LLVM_CONFIG --version
 
 git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator -b 
llvm_release_100 --depth 1 /SPIRV-LLVM-Translator
 pushd /SPIRV-LLVM-Translator
-cmake -G Ninja -DLLVM_BUILD_TOOLS=ON -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC 
-DCMAKE_INSTALL_PREFIX=`$LLVM_CONFIG --prefix`
+cmake -S . -B . -G Ninja -DLLVM_BUILD_TOOLS=ON -DCMAKE_BUILD_TYPE=Release 
-DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC 
-DCMAKE_INSTALL_PREFIX=`$LLVM_CONFIG --prefix`
 ninja
 ninja install
 popd
@@ -23,7 +23,7 @@ git clone \
 
 mkdir /libclc
 pushd /libclc
-cmake -G Ninja -DLLVM_CONFIG=$LLVM_CONFIG 
-DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" 
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr /llvm-project/libclc
+cmake -S /llvm-project/libclc -B . -G Ninja -DLLVM_CONFIG=$LLVM_CONFIG 
-DLIBCLC_TARGETS_TO_BUILD="spirv-mesa3d-;spirv64-mesa3d-" 
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
 ninja
 ninja install
 popd
diff --git a/.gitlab-ci/build-piglit.sh b/.gitlab-ci/build-piglit.sh
index c1e936744a1..2fd0f9547da 100644
--- a/.gitlab-ci/build-piglit.sh
+++ b/.gitlab-ci/build-piglit.sh
@@ -10,7 +10,7 @@ git clone https://gitlab.freedesktop.org/mesa/piglit.git 
--single-branch --no-ch
 pushd /piglit
 git checkout 404862743cf8a7b37a4e3a93b4ba1858d59cd4ab
 patch -p1 <$OLDPWD/.gitlab-ci/piglit/disable-vs_in.diff
-cmake -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS
+cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release $PIGLIT_OPTS
 ninja
 find -name .git -o -name '*ninja*' -o -iname '*cmake*' -o -name '*.[chao]' | 
xargs rm -rf
 rm -rf target_api
diff --git a/.gitlab-ci/build-renderdoc.sh b/.gitlab-ci/build-renderdoc.sh
index bc21cc864a9..b44fb302011 100644
--- a/.gitlab-ci/build-renderdoc.sh
+++ b/.gitlab-ci/build-renderdoc.sh
@@ -7,7 +7,7 @@ RENDERDOC_VERSION=da02e88201dc3b64316fc33ce6ff69cc729689aa
 git clone https://github.com/baldurk/renderdoc.git --single-branch 
--no-checkout /renderdoc
 pushd /renderdoc
 git checkout "$RENDERDOC_VERSION"
-cmake -G Ninja -B_build -H. -DENABLE_QRENDERDOC=false 
-DCMAKE_BUILD_TYPE=Release $EXTRA_CMAKE_ARGS
+cmake -S . -B _build -G Ninja -DENABLE_QRENDERDOC=false 
-DCMAKE_BUILD_TYPE=Release $EXTRA_CMAKE_ARGS
 ninja -C _build
 mkdir -p build/lib
 ${STRIP_CMD:-strip} _build/lib/*.so
diff --git a/.gitlab-ci/build-spirv-tools.sh b/.gitlab-ci/build-spirv-tools.sh
index 02df9a71b31..e39083c30d4 100644
--- a/.gitlab-ci/build-spirv-tools.sh
+++ b/.gitlab-ci/build-spirv-tools.sh
@@ -7,7 +7,7 @@ pushd SPIRV-Tools
 pushd external
 git clone --depth 1 https://github.com/KhronosGroup/SPIRV-Headers
 popd
-cmake -G Ninja -B_build -H. -DCMAKE_BUILD_TYPE=Release
+cmake -S . -B _build -G Ninja -DCMAKE_BUILD_TYPE=Release
 ninja -C _build
 ninja -C _build install
 popd
diff --git a/.gitlab-ci/build-vulkantools.sh b/.gitlab-ci/build-vulkantools.sh
index 099d362550f..5924c80d249 100644
--- a/.gitlab-ci/build-vulkantools.sh
+++ b/.gitlab-ci/build-vulkantools.sh
@@ -10,7 +10,7 @@ git checkout "$VULKANTOOLS_VERSION"
 ./update_external_sources.sh
 mkdir _build
 ./scripts/update_deps.py --dir=_build --config=release --generator=Ninja
-cmake -G Ninja -B_build -H. \
+cmake -S . -B _build -G Ninja \
       -DCMAKE_BUILD_TYPE=Release \
       -DCMAKE_INSTALL_PREFIX=/VulkanTools/build \
       -DBUILD_TESTS=OFF \
diff --git a/.gitlab-ci/container/x86_build.sh 
b/.gitlab-ci/container/x86_build.sh
index 6444290c11d..5f68005fec9 100644
--- a/.gitlab-ci/container/x86_build.sh
+++ b/.gitlab-ci/container/x86_build.sh
@@ -105,7 +105,7 @@ rm -rf libglvnd-v$GLVND_VERSION
 
 git clone https://github.com/KhronosGroup/SPIRV-LLVM-Translator -b 
llvm_release_100 --depth 1
 pushd SPIRV-LLVM-Translator
-cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fPIC 
-DCMAKE_CXX_FLAGS=-fPIC
+cmake -S . -B . -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-fPIC 
-DCMAKE_CXX_FLAGS=-fPIC
 ninja
 ninja install
 popd
diff --git a/.gitlab-ci/lava-gitlab-ci.yml b/.gitlab-ci/lava-gitlab-ci.yml
index 03201776e67..6bba53f7547 100644
--- a/.gitlab-ci/lava-gitlab-ci.yml
+++ b/.gitlab-ci/lava-gitlab-ci.yml
@@ -1,5 +1,5 @@
 variables:
-  DISTRIBUTION_TAG: "2020-12-14-cts"
+  DISTRIBUTION_TAG: "2020-12-16-cmake"
 
 .kernel+rootfs:
   stage: container-2

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to