summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.gitlab/ci/clang-env.ps115
-rw-r--r--.gitlab/ci/env_windows_clang_common.cmake7
-rw-r--r--.gitlab/ci/env_windows_clang_ninja.cmake1
-rw-r--r--.gitlab/ci/env_windows_clang_nmake.cmake1
-rw-r--r--.gitlab/os-windows.yml5
5 files changed, 16 insertions, 13 deletions
diff --git a/.gitlab/ci/clang-env.ps1 b/.gitlab/ci/clang-env.ps1
new file mode 100755
index 0000000..451fca3
--- /dev/null
+++ b/.gitlab/ci/clang-env.ps1
@@ -0,0 +1,15 @@
+Invoke-Expression -Command .gitlab/ci/clang.ps1
+Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
+
+$pwdpath = $pwd.Path
+Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\llvm\bin;$env:PATH"
+
+if ("$env:CMAKE_CI_BUILD_NAME" -match "(^|_)gnu(_|$)") {
+ $env:CC = "clang"
+ $env:CXX = "clang++"
+ clang --version
+} else {
+ $env:CC = "clang-cl"
+ $env:CXX = "clang-cl"
+ clang-cl --version
+}
diff --git a/.gitlab/ci/env_windows_clang_common.cmake b/.gitlab/ci/env_windows_clang_common.cmake
deleted file mode 100644
index fdd668f..0000000
--- a/.gitlab/ci/env_windows_clang_common.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-if("$ENV{CMAKE_CI_BUILD_NAME}" MATCHES "(^|_)gnu(_|$)")
- set(ENV{CC} clang)
- set(ENV{CXX} clang++)
-else()
- set(ENV{CC} clang-cl)
- set(ENV{CXX} clang-cl)
-endif()
diff --git a/.gitlab/ci/env_windows_clang_ninja.cmake b/.gitlab/ci/env_windows_clang_ninja.cmake
deleted file mode 100644
index f3834a2..0000000
--- a/.gitlab/ci/env_windows_clang_ninja.cmake
+++ /dev/null
@@ -1 +0,0 @@
-include("${CMAKE_CURRENT_LIST_DIR}/env_windows_clang_common.cmake")
diff --git a/.gitlab/ci/env_windows_clang_nmake.cmake b/.gitlab/ci/env_windows_clang_nmake.cmake
deleted file mode 100644
index f3834a2..0000000
--- a/.gitlab/ci/env_windows_clang_nmake.cmake
+++ /dev/null
@@ -1 +0,0 @@
-include("${CMAKE_CURRENT_LIST_DIR}/env_windows_clang_common.cmake")
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index 78ebb2e..6f9c292 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -396,10 +396,7 @@
script:
- . .gitlab/ci/env.ps1
- . .gitlab/ci/ninja-env.ps1
- - Invoke-Expression -Command .gitlab/ci/clang.ps1
- - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- - $pwdpath = $pwd.Path
- - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\llvm\bin;$env:PATH"
+ - . .gitlab/ci/clang-env.ps1
- build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true