Compile with `-D_WIN32_WINNT=0x502` to use a WinXP-compatible API.
Compile with `-D_USING_V110_SDK71_` to tell the VS standard library
headers that we are building with a WinXP-compatible Windows SDK. Link
executables with `-subsystem:console,5.02` to make them runnable on
Windows XP 64-bit. Ideally `cmake-gui` should instead be linked with
`-subsystem:windows,5.02` but with the Ninja and Makefile generators
CMake adds `-subsystem:windows` after our `-subsystem:console,5.02` flag
and the linker seems to interpret this combination as we need.
Our upstream-built release tarballs already contain many unversioned
paths and so will never overlap with another version of CMake in the
same installation prefix. Therefore we do not need a versioned name for
the documentation directory. Configure our release binaries to place
the documentation in an unversioned directory so that one can use the
same path to refer to the documentation locally even after updating
CMake. For example, on OS X one may see the documentation in
`/Applications/CMake.app/Contents/doc/cmake/html/index.html`.
Avoid requiring all build machines for the upstream packaging process to
have Python and Sphinx installed. Instead create a way to build the
documentation once on the host machine and copy it to each build machine
as a tarball with content to include in the installation tree for
packaging.
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block. This is no longer the preferred style.
Run the following shell code:
for c in else endif endforeach endfunction endmacro endwhile; do
echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
Set GIT_COMMAND to "git" -- each machine involved in building
the CMake release binaries has the right "git" in the PATH.
Separate the release scripts into two batches so we can build
multiple releases on the same machine, in serial, if necessary.
We currnetly do this with the Windows and Cygwin release
binaries on dash2win64.
Sort the files to be uploaded, so that sorting them by modification
time (file copy / upload time) is equivalent to sorting them
alphabetically.