Add platform configuration variable CMAKE_SYSTEM_IGNORE_PATH and user
configuration variable CMAKE_IGNORE_PATH. These specify a set of
directories that will be ignored by all the find commands. Update
FindPackageTest so that several cases will fail without a functioning
CMAKE_IGNORE_PATH.
This is not needed but it does not cost much to do it for all
potentially supported format in libarchive. XZ and LZMA are not
builtin libarchive and require external lib but if
CMAKE_USE_SYSTEM_LIBARCHIVE is ON then we may get it for free.
This will be needed to use cmArchiveWrire in cmCPackArchiveGenerator
with the same feature set as before. Note that adding zip
support to libarchive-wrapper would also makes it easy to add
a new -E zip command to cmake commands.
The multi-argument CompressFiles(...) method has been replace by the
no-argument PackageFiles() method and 3 more member variables. This
will enable implemention of multi-package generators. Now each specific
generator (which overloads PackageFiles()) may decide to change the name
and/or the number of generated package files.
Some stream libraries return size_t from gcount() and some return
ssize_t. Add an explicit cast to ios::streamsize for its return value.
Also refactor use of nnext to reduce the use of casts.
aef6723 cmArchiveWrite: Fix signed/unsigned compare/convert
1b5b2ed Include entries for directories in tarballs (#11020)
c7c9009 Create class cmArchiveWrite to wrap libarchive (#11020)
ac26737 Merge branch 'system-libarchive-include' into libarchive-wrapper
3296e6a Include headers from chosen libarchive (#10923)
The libarchive interface accepts size_t but returns ssize_t. The std
streams interface wants streamsize, which is typically ssize_t. Since
no one type for our variable matches without conversions, make the
conversions explicit to avoid -Wsign-conversion and -Wsign-compare
warnings.
Use libarchive through class cmArchiveWrite to implement the method
cmSystemTools::CreateTar. The class includes entries for directories by
automatically traversing the tree on disk.
a7319cf ctest_update: Run 'git submodule' at top level
7bf8dc1 ctest_update: Support ".git file" work trees
65cb72f ctest_update: Abort if Git FETCH_HEAD has no candidates
The git submodule porcelain must be executed from the top level of the
work tree. Use 'git rev-parse --show-cdup' to find the top level
relative to the source tree. This is better than searching up the tree
for .git ourselves because it will always work the same way Git does and
thus honors settings like GIT_DISCOVERY_ACROSS_FILESYSTEM.
Commit c3781efb (Support Git upstream branch rewrites, 2010-06-08)
assumed that ".git/FETCH_HEAD" exists inside the source tree. Fix the
implementation to handle a work tree using a ".git file" to link to its
repository. Use "git rev-parse --git-dir" to locate the real .git dir.
If .git/FETCH_HEAD provides no merge candidate do not attempt to update.
Also log FETCH_HEAD lines as we parse them since they are essentially
output from the git fetch command.
38c762c Merge 'remove-CTestTest3' into ctest-file-checksum
46df0b4 Activate retry code on any curl submit failure.
8705497 Checksum test should use CMAKE_TESTS_CDASH_SERVER
d0d1cdd Mock checksum failure output for old CDash versions
af5ef0c Testing for CTest checksum
86e81b5 CTest should resubmit in the checksum failed case
d6b7107 Fix subscript out of range crash
082c87e Cross-platform fixes for checksum/retry code
e525649 Checksums on CTest submit files, and retry timed out submissions.
Previously, we were only going into the retry block
for time out conditions. But a "could not connect"
response, or really any sort of curl failure, is
also a condition where we should retry the submit
if the user has requested a retry.
Fix niggly in ExternalProject that would inadvertently
create a log file of output when a command was explicitly
set to the empty string.
Also, increase the default value for showing context
around build errors to 10 lines, up from 6. Also add
the ability to customize this setting so that users
can put it back to 6 or even lower if they want, or
show more if they want.
Clang is smart enough to recognize that "*(int*)0=0" invokes undefined
behavior, warns, and produces an "undefined instruction". The message
in commit "Avoid Clang optimizer bug in testProcess-[45]" (2010-07-02)
is incorrect; this is not a Clang bug. It really is undefined
behavior. Use "*(int*)1=0" to produce a crash instead.
Clang's optimizer, as of clang version 2.8 (trunk 107463), produces the
undefined instruction 'ud2' for the code "*(int*)0=0" on OS X x86_64.
It causes our crash tests to fail because the child process exits with
an invalid instruction instead of a segmentation fault. Work around the
bug by using "*(int*)1=0" in this case.
Add option KWSYS_TEST_BOGUS_FAILURES that can be set by a containing
project or in the CMake cache to list tests known to fail consistently
on a buggy system.
Commit ff1f8d0b (Fix or cast more integer conversions in cmake) changed
a member type from int to size_t. Update the types of variables
compared to these values to be unsigned also.
Both possible result values need to be convertible to the same type.
Some compilers fail to recognize that they can construct std::string
from the empty string literal, so state it explicitly.
Since commit "Provide unix-sytle command line parsing" (2009-07-13) the
reference to KWSYS_C_HAS_PTRDIFF_T in System.c has been meaningless
because the macro was never passed to the compiler!
Separation by ',' only works in VS 2008 and below and does not work in
the PlayStation3 VS plugin. Separation by ';' works in VS 10 and all
prior versions.
Change types of local variables, or casting, or re-arrange
expressions to get rid of "conversion may alter value" warnings
as seen on recent dashboard submissions from londinium.kitware.
I naively assumed in my previous commit that the Convert call
would correctly convert a relative path file name correctly
relative to the makefile's current output directory. It actually
converts it relative to the process's current working directory.
So it would be different depending on how you launched cmake-gui.
This commit ensures that the generated files are always the same
by starting with a full path to begin with, based on the makefile
GetCurrentOutputDirectory method.
Git's diff-tree format has no '\n'-terminated blank line at the end of
its commit message body block if there are no diff lines. Instead the
message body is terminated by '\0' and there is no diff section. Teach
CTest to parse the format in this case.
This is especially important for the Visual Studio 10
generator and its quirky current working directory
behavior.
Also, emit more information about exactly what files are
out of date when cmakeCheckStampFile returns false.
Commit 02f7cfbc (Need to remove the MAKEFLAGS when cmake starts,
2003-05-13) removed the MAKEFLAGS environment variable when CMake starts
to prevent try_compile() from inheriting "make -i". This is unnecessary
in script mode (cmake -P). Instead remove the variable only when
configuring a project.
Tru64's make(1) resolves relative paths in "include" directives with
respect to the includer. This is inconsistent with all other known make
tools. Note that this make tool treats the path literally so we cannot
use our standard FULL path code which escapes spaces. Instead qualify
the paths with $(CMAKE_BINARY_DIR) to avoid the problem.
GCC places the vtable in the object implementing the first non-pure,
non-inline virtual method. Since the symbol is not weak on Tru64, make
the location unique by putting the destructor in a single object file.
The DynamicLoader::LibPrefix and DynamicLoader::LibExtension methods
previously hard-coded the module name components for each platform. Set
them from the CMAKE_SHARED_MODULE_PREFIX and CMAKE_SHARED_MODULE_SUFFIX
CMake variables instead. This ensures consistency in a program that
uses these methods to construct the file names for its own modules.
Use 'git fetch' followed by 'git reset' to update the source tree. This
is better than 'git pull' because it can handle a rewritten upstream
branch and does not leave local modifications. After fetch, parse
FETCH_HEAD to find the merge head that 'git pull' would choose to track
the upstream branch. Then reset to the selected head.
In the normal fast-forward case the behavior remains unchanged.
However, now local modifications and commits will be erased, and
upstream rewrites are handled smoothly. This ensures that the upstream
branch is tested as expected.
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.