Skip to content

Commit fa172ee

Browse files
authored
Merge pull request #97 from microsoft/dev/jgoshi/FIcmake3_18
FI cmake 3.18
2 parents 14721db + d566a39 commit fa172ee

File tree

2,684 files changed

+106771
-103851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,684 files changed

+106771
-103851
lines changed

.clang-format

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,18 @@ IncludeCategories:
3232
Priority: 5
3333
- Regex: '^(<|")Qt?[A-Z]'
3434
Priority: 6
35-
- Regex: '^(<|")cmsys/'
35+
- Regex: '^<cmtp/'
3636
Priority: 7
37-
- Regex: '^(<|")cm_'
37+
- Regex: '^(<|")cmsys/'
3838
Priority: 8
39-
- Regex: '^(<|")cm[A-Z][^.]+\.h'
39+
- Regex: '^(<|")cm_'
4040
Priority: 9
41+
- Regex: '^(<|")cm[A-Z][^.]+\.h'
42+
Priority: 10
4143
- Regex: '^<[^.]+\.h'
4244
Priority: 4
4345
- Regex: '^<'
4446
Priority: 1
4547
- Regex: '.*'
46-
Priority: 10
48+
Priority: 11
4749
...

.clang-tidy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ modernize-*,\
1313
-modernize-avoid-c-arrays,\
1414
-modernize-use-nodiscard,\
1515
-modernize-use-noexcept,\
16+
-modernize-use-trailing-return-type,\
1617
-modernize-use-transparent-functors,\
1718
performance-*,\
1819
readability-*,\
20+
-readability-convert-member-functions-to-static,\
1921
-readability-function-size,\
2022
-readability-identifier-naming,\
2123
-readability-implicit-bool-conversion,\

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ Thanks for your interest in contributing to CMake! The GitHub repository
22
is a mirror provided for convenience, but CMake does not use GitHub pull
33
requests for contribution. Please see
44

5-
https://gitlab.kitware.com/cmake/cmake/tree/master/CONTRIBUTING.rst
5+
https://gitlab.kitware.com/cmake/cmake/-/tree/master/CONTRIBUTING.rst
66

77
for contribution instructions. GitHub OAuth may be used to sign in.

.gitlab-ci.yml

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
include:
2+
# Metadata shared my many jobs
3+
- local: .gitlab/rules.yml
4+
- local: .gitlab/artifacts.yml
5+
6+
# OS builds.
7+
- local: .gitlab/os-linux.yml
8+
- local: .gitlab/os-macos.yml
9+
- local: .gitlab/os-windows.yml
10+
11+
stages:
12+
- build
13+
- test
14+
- test-ext
15+
16+
################################################################################
17+
# Job declarations
18+
#
19+
# Each job must pull in each of the following keys:
20+
#
21+
# - a "base image"
22+
# - a build script
23+
# - tags for the jobs
24+
# - rules for when to run the job
25+
#
26+
# Additionally, jobs may also contain:
27+
#
28+
# - artifacts
29+
# - dependency/needs jobs for required jobs
30+
################################################################################
31+
32+
# Lint builds
33+
34+
build:debian10-iwyu:
35+
extends:
36+
- .debian10_iwyu
37+
- .cmake_build_linux
38+
- .linux_builder_tags
39+
- .run_automatically
40+
41+
build:fedora31-tidy:
42+
extends:
43+
- .fedora31_tidy
44+
- .cmake_build_linux
45+
- .linux_builder_tags_qt
46+
- .run_automatically
47+
48+
build:fedora31-sphinx:
49+
extends:
50+
- .fedora31_sphinx
51+
- .cmake_build_linux
52+
- .linux_builder_tags_qt
53+
- .run_automatically
54+
55+
# Linux builds
56+
57+
build:centos6-release:
58+
extends:
59+
- .release_linux
60+
- .cmake_build_release_linux
61+
- .cmake_release_artifacts
62+
- .linux_builder_tags
63+
- .run_manually
64+
65+
test:fedora31-makefiles:
66+
extends:
67+
- .fedora31_makefiles
68+
- .cmake_test_linux_package
69+
- .linux_builder_tags_qt
70+
- .run_automatically
71+
dependencies:
72+
- build:centos6-release
73+
needs:
74+
- build:centos6-release
75+
76+
test:cuda10.2-nvidia:
77+
extends:
78+
- .cuda10.2_nvidia
79+
- .cmake_test_linux_package
80+
- .linux_builder_tags_cuda
81+
- .run_automatically
82+
dependencies:
83+
- build:centos6-release
84+
needs:
85+
- build:centos6-release
86+
87+
build:fedora31-ninja:
88+
extends:
89+
- .fedora31_ninja
90+
- .cmake_build_linux
91+
- .cmake_build_artifacts
92+
- .linux_builder_tags_qt
93+
- .run_manually
94+
95+
test:fedora31-ninja:
96+
extends:
97+
- .fedora31_ninja
98+
- .cmake_test_linux
99+
- .linux_builder_tags_qt
100+
- .cmake_test_artifacts
101+
- .run_automatically
102+
dependencies:
103+
- build:fedora31-ninja
104+
needs:
105+
- build:fedora31-ninja
106+
107+
test:fedora31-ninja-multi:
108+
extends:
109+
- .fedora31_ninja_multi
110+
- .cmake_test_linux_external
111+
- .linux_builder_tags_qt
112+
- .run_automatically
113+
dependencies:
114+
- test:fedora31-ninja
115+
needs:
116+
- test:fedora31-ninja
117+
118+
# macOS builds
119+
120+
build:macos-ninja:
121+
extends:
122+
- .macos_ninja
123+
- .cmake_build_macos
124+
- .cmake_build_artifacts
125+
- .macos_builder_tags
126+
- .run_manually
127+
128+
test:macos-ninja:
129+
extends:
130+
- .macos_ninja
131+
- .cmake_test_macos
132+
- .cmake_test_artifacts
133+
- .macos_builder_tags
134+
- .run_automatically
135+
dependencies:
136+
- build:macos-ninja
137+
needs:
138+
- build:macos-ninja
139+
140+
build:macos-makefiles:
141+
extends:
142+
- .macos_makefiles
143+
- .cmake_build_macos
144+
- .cmake_build_artifacts
145+
- .macos_builder_tags
146+
- .run_manually
147+
148+
test:macos-makefiles:
149+
extends:
150+
- .macos_makefiles
151+
- .cmake_test_macos
152+
- .macos_builder_tags
153+
- .run_automatically
154+
dependencies:
155+
- build:macos-makefiles
156+
needs:
157+
- build:macos-makefiles
158+
159+
test:macos-xcode:
160+
extends:
161+
- .macos_xcode
162+
- .cmake_test_macos_external
163+
- .macos_builder_ext_tags
164+
- .run_automatically
165+
dependencies:
166+
- test:macos-ninja
167+
needs:
168+
- test:macos-ninja
169+
170+
# Windows builds
171+
172+
build:windows-vs2019-x64-ninja:
173+
extends:
174+
- .windows_vs2019_x64_ninja
175+
- .cmake_build_windows
176+
- .cmake_build_artifacts
177+
- .windows_builder_tags
178+
- .run_manually
179+
180+
test:windows-vs2019-x64-ninja:
181+
extends:
182+
- .windows_vs2019_x64_ninja
183+
- .cmake_test_windows
184+
- .windows_builder_tags
185+
- .cmake_test_artifacts
186+
- .run_automatically
187+
dependencies:
188+
- build:windows-vs2019-x64-ninja
189+
needs:
190+
- build:windows-vs2019-x64-ninja
191+
192+
test:windows-vs2019-x64:
193+
extends:
194+
- .windows_vs2019_x64
195+
- .cmake_test_windows_external
196+
- .windows_builder_ext_tags
197+
- .run_automatically
198+
dependencies:
199+
- test:windows-vs2019-x64-ninja
200+
needs:
201+
- test:windows-vs2019-x64-ninja

.gitlab/artifacts.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Lists of paths for artifacts of various stages.
2+
3+
.cmake_build_artifacts:
4+
artifacts:
5+
expire_in: 1d
6+
paths:
7+
# XXX(globbing): Can be simplified with support from
8+
# https://gitlab.com/gitlab-org/gitlab-runner/issues/4840
9+
- build/CTestTestfile.cmake
10+
- build/*/CTestTestfile.cmake
11+
- build/*/*/CTestTestfile.cmake
12+
- build/*/*/*/CTestTestfile.cmake
13+
- build/*/*/*/*/CTestTestfile.cmake
14+
15+
# Allow CMake to find CMAKE_ROOT.
16+
- build/CMakeFiles/CMakeSourceDir.txt
17+
18+
# Take the install tree.
19+
- build/install/
20+
21+
# We need the main binaries.
22+
- build/bin/
23+
# The cache is needed for the installation test.
24+
- build/CMakeCache.txt
25+
# Test binaries. Eventually these might be better under
26+
# `Source/Tests` or the like.
27+
- build/Tests/EnforceConfig.cmake
28+
- build/Tests/CMakeBuildTest.cmake
29+
- build/Tests/CMakeBuildDoubleProjectTest.cmake
30+
- build/Tests/CMake*/runcompilecommands
31+
- build/Tests/CMake*/runcompilecommands.exe
32+
- build/Tests/CMake*/test*
33+
- build/Tests/CMake*/PseudoMemcheck/valgrind
34+
- build/Tests/CMake*/PseudoMemcheck/purify
35+
- build/Tests/CMake*/PseudoMemcheck/memcheck_fail
36+
- build/Tests/CMake*/PseudoMemcheck/BC
37+
- build/Tests/CMake*/PseudoMemcheck/valgrind.exe
38+
- build/Tests/CMake*/PseudoMemcheck/purify.exe
39+
- build/Tests/CMake*/PseudoMemcheck/memcheck_fail.exe
40+
- build/Tests/CMake*/PseudoMemcheck/BC.exe
41+
- build/Tests/CMake*/PseudoMemcheck/NoLog
42+
- build/Tests/CMake*Lib/*LibTests
43+
- build/Tests/CMake*Lib/*LibTests.exe
44+
- build/Source/kwsys/cmsysTest*
45+
- build/Source/kwsys/testConsoleBufChild.exe
46+
- build/Utilities/cmcurl/curltest
47+
- build/Utilities/cmcurl/curltest.exe
48+
- build/Utilities/KWIML/test/kwiml_test
49+
- build/Utilities/KWIML/test/kwiml_test.exe
50+
- build/Source/kwsys/*cmsysTestDynload.*
51+
- build/Source/kwsys/dynloaddir/cmsysTestDynloadImpl.dll
52+
- build/Source/kwsys/dynloaddir/cmsysTestDynloadUse.dll
53+
54+
# Test directories.
55+
- build/Tests/CTest*
56+
- build/Tests/Find*
57+
- build/Tests/Qt5*
58+
- build/Tests/RunCMake/
59+
- build/Tests/CMakeOnly/
60+
- build/Tests/CMakeTests/
61+
62+
# CTest/CDash information.
63+
- build/Testing/
64+
- build/DartConfiguation.tcl
65+
- build/CTestCustom.cmake
66+
67+
.cmake_release_artifacts:
68+
artifacts:
69+
expire_in: 5d
70+
paths:
71+
# Any packages made.
72+
- build/cmake-*-Linux-x86_64.*
73+
74+
.cmake_test_artifacts:
75+
artifacts:
76+
expire_in: 1d
77+
paths:
78+
# Take the install tree.
79+
- build/install/

.gitlab/ci/cmake.ps1

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
$erroractionpreference = "stop"
2+
3+
$version = "3.17.2"
4+
$sha256sum = "CF82B1EB20B6FBE583487656FCD496490FFCCDFBCBBA0F26E19F1C9C63B0B041"
5+
$filename = "cmake-$version-win64-x64"
6+
$tarball = "$filename.zip"
7+
8+
$outdir = $pwd.Path
9+
$outdir = "$outdir\.gitlab"
10+
Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
11+
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
12+
if ($hash.Hash -ne $sha256sum) {
13+
exit 1
14+
}
15+
16+
Add-Type -AssemblyName System.IO.Compression.FileSystem
17+
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
18+
Move-Item -Path "$outdir\$filename" -Destination "$outdir\cmake"

.gitlab/ci/cmake.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
readonly version="3.17.2"
6+
7+
case "$( uname -s )" in
8+
Linux)
9+
shatool="sha256sum"
10+
sha256sum="dc57f3cc448ca67fc8776b4ad4c22b087b9c6a8e459938b9622b8c7f4ef6b21e"
11+
platform="Linux"
12+
;;
13+
Darwin)
14+
shatool="shasum -a 256"
15+
sha256sum="139500e20b080444fcafe57f24f57248c691c5187cce6695bee2b9aad6792c7d"
16+
platform="Darwin"
17+
;;
18+
*)
19+
echo "Unrecognized platform $( uname -s )"
20+
exit 1
21+
;;
22+
esac
23+
readonly shatool
24+
readonly sha256sum
25+
readonly platform
26+
27+
readonly filename="cmake-$version-$platform-x86_64"
28+
readonly tarball="$filename.tar.gz"
29+
30+
cd .gitlab
31+
32+
echo "$sha256sum $tarball" > cmake.sha256sum
33+
curl -OL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball"
34+
$shatool --check cmake.sha256sum
35+
tar xf "$tarball"
36+
mv "$filename" cmake
37+
38+
if [ "$( uname -s )" = "Darwin" ]; then
39+
ln -s CMake.app/Contents/bin cmake/bin
40+
fi

.gitlab/ci/configure_common.cmake

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
set(CTEST_USE_LAUNCHERS "ON" CACHE BOOL "")
2+
3+
# We run the install right after the build. Avoid rerunning it when installing.
4+
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "ON" CACHE BOOL "")
5+
# Install CMake under the build tree.
6+
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "")
7+
set(CMake_TEST_INSTALL "OFF" CACHE BOOL "")
8+
9+
if (NOT "$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
10+
set(CMAKE_BUILD_TYPE "$ENV{CMAKE_BUILD_TYPE}" CACHE STRING "")
11+
endif ()
12+
13+
include("${CMAKE_CURRENT_LIST_DIR}/configure_sccache.cmake")

0 commit comments

Comments
 (0)