Commit 67277bac (Teach ctest_update about Git submodules, 2010-05-04)
accidentally logged "git submodule update" with the prefixes "pull-out"
and "pull-err". Fix it to use "submodule-out" and "submodule-err"
instead.
The CopyFileIfDifferent, CopyFileAlways, CopyAFile and CopyADirectory
methods should always copy permissions. The special cases in which a
caller would pass copyPermissions=false should be handled at the call
site. The parameter needlessly complicates the interface and semantics
of these methods.
If there is a .bat or .cmd file used as a custom command
then the Borland Makefiles generator (specifically) requires
using the "call " syntax before the name of the .bat or .cmd
file. This fix applies to all Makefile based generators where
WindowsShell is true.
On Windows 7 the file size reported by 'stat' on a new file sometimes
reports zero even though the real size is correct. This causes our
CopyFileAlways method to falsely detect copy failure. Work around the
problem by trusting the state of ofstream after writing the file.
Commit 0fafdb7e (Do not copy permissions of files when making the copy
in an install rule, 2008-12-18) added special behavior to KWSys file
copy methods for this special case. Use a local solution to avoid use
of the special behavior so it can be removed later.
Commit 8d0161c8 (Trust umask for file permissions, 2010-01-12) taught
these commands to set permissions to 0666 explicitly. The intention was
to let the open() call inside ofstream handle permsisions so that umask
would be honored. Now we set permissions only when we need to preserve
those on an existing file. New files will be created with umask-based
permissions.
The LINK_FLAGS property is defined only for targets that really link.
These include executables and shared libraries. For static libraries we
define the STATIC_LIBRARY_FLAGS property. Teach the Xcode generator to
make this distinction.
Improve FILE(DOWNLOAD ...):
- Add percent complete progress output to the FILE DOWNLOAD
command. This progress output is off by default to
preserve existing behavior. To turn it on, pass
SHOW_PROGRESS as an argument.
- Add EXPECTED_MD5 argument. Verify that the downloaded
file has the expected md5 sum after download is complete.
- Add documentation for SHOW_PROGRESS and EXPECTED_MD5.
When the destination file exists already and has the
expected md5 sum, then do not bother re-downloading
the file. ("Short circuit" return.)
Also, add a test that checks for the status output
indicating that the short circuit behavior is actually
occurring. Use a binary file for the test so that the
md5 sum is guaranteed to be the same on all platforms
regardless of "shifting text file line ending" issues.
Improve ExternalProject:
- Add argument URL_MD5.
- Add verify step that compares md5 sum of .tar.gz file
before extracting it.
- Add md5 check to download step, too, to prevent
unnecessary downloads.
- Emit a warning message when a file is not verified.
Indicate that the file may be corrupt or that no
checksum was specified.