Expose the internal system information API to the CMake language. For
example, it is useful to see how much memory the system has available to
estimate an upper limit of tests that can run in parallel.
Checkout [1] as an example of the test failures. In that particular cases, the
failures is caused by the plus sign in the path being pass unescaped
(buildd-cmake_2.8.9-1~bpo60+1-armel-3Lvkef) to the regexp.
In addition to failures in the log, the following new tests also fail in 2.8.11:
243 - CTestTestMemcheckUnknown (Failed)
244 - CTestTestMemcheckUnknownQuoted (Failed)
248 - CTestTestMemcheckDummyValgrindFailPre (Failed)
249 - CTestTestMemcheckDummyValgrindFailPost (Failed)
250 - CTestTestMemcheckDummyPurify (Failed)
251 - CTestTestMemcheckDummyBC (Failed)
253 - CMake.List (Failed)
[1] https://buildd.debian.org/status/fetch.php?pkg=cmake&arch=armel&ver=2.8.9-1~bpo60%2B1&stamp=1369243896
Teach CMakeParseImplicitLinkInfo to convert the CMAKE_LINKER file name
to a regular expression that matches only the original name. Escape
special characters like '+' so they are not treated as regex syntax.
Extend the ImplicitLinkInfoTest to test handling of a CMAKE_LINKER value
with many special characters.
Teach CMakeParseImplicitLinkInfo to convert implicit link library full
paths to a canonical form. This makes them more reproducible in case
different language compiler front-ends add the same library by different
paths e.g. ".../libA.a" and "...//libA.a".
Add a case to the CMake.ImplicitLinkInfo test to cover removal of extra
slashes from both library and directory paths.
Previously we hard-coded a list of implicit framework directories but
did not account for CMAKE_OSX_SYSROOT or for changes to the list across
OS X versions. Instead we should automatically detect the framework
directories for the active toolchain.
The parent commit added the "-Wl,-v" option to ask "ld" to print its
implicit directories. It displays a block such as:
Framework search paths:
/...
Parse this block to extract the list of framework directories.
Detection may fail on toolchains that do not list their framework
directories, such as older OS X linkers. Always treat the paths
<sdk>/Library/Frameworks
<sdk>/System/Library/Frameworks
<sdk>/Network/Library/Frameworks # Older OS X only
/System/Library/Frameworks
as implicit. Note that /System/Library/Frameworks should always be
considered implicit so that frameworks CMake finds there will not
override the SDK copies.
We detect the implicit link directories for the toolchain by adding a
flag to get verbose output from the compiler front-end while linking the
ABI detection binary. Newer OS X toolchains based on Clang do not add
the implicit link directories with -L options to their internal
invocation of "ld". Instead they use a linker that comes with the
toolchain and is already configured with the proper directories.
Add the "-Wl,-v" option to ask "ld" to print its implicit directories.
It displays them in a block such as:
Library search paths:
/...
Parse this block to extract the implicit link directories.
While at it, remove the checks introduced by commit efaf335b (Skip
implicit link information on Xcode, 2009-07-23) and commit 5195a664
(Skip implicit link info for multiple OS X archs, 2009-09-22). Discard
the non-system link directories added by Xcode. Discard all detected
implicit libraries in the multi-architecture case but keep the
directories. The directories are still useful without the libraries
just to suppress addition of explicit -L options for them.
The file command requires at least two arguments, so guarding the GLOB and
MAKE_DIRECTORY command is not necessary. Changed it for an assert to keep the
protection.
Make the EXPECTED_HASH option take only a single value instead of two to
avoid handling sub-keyword arguments. This is also consistent with
URL_HASH in ExternalProject.
Extend the number of components tested by
if(... VERSION_LESS ...)
if(... VERSION_EQUAL ...)
if(... VERSION_GREATER ...)
from 4 to 8. The latter is a more extreme maximum.
e5fee8a Store ABI detection results in compiler information files
3df81b4 Move CMAKE_<LANG>_COMPILER_WORKS to compiler information files
7195aca Make platform information files specific to the CMake version
At the top of a build tree we configure inside the CMakeFiles directory
files such as "CMakeSystem.cmake" and "CMake<lang>Compiler.cmake" to
save information detected about the system and compilers in use. The
method of detection and the exact results store varies across CMake
versions as things improve. This leads to problems when loading files
configured by a different version of CMake. Previously we ignored such
existing files only if the major.minor part of the CMake version
component changed, and depended on the CMakeCache.txt to tell us the
last version of CMake that wrote the files. This led to problems if the
user deletes the CMakeCache.txt or we add required information to the
files in a patch-level release of CMake (still a "feature point" release
by modern CMake versioning convention).
Ensure that we always have version-consistent platform information files
by storing them in a subdirectory named with the CMake version. Every
version of CMake will do its own system and compiler identification
checks even when a build tree has already been configured by another
version of CMake. Stored results will not clobber those from other
versions of CMake which may be run again on the same tree in the future.
Loaded results will match what the system and language modules expect.
Rename the undocumented variable CMAKE_PLATFORM_ROOT_BIN to
CMAKE_PLATFORM_INFO_DIR to clarify its purpose. The new variable points
at the version-specific directory while the old variable did not.
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
We no longer support CVS checkouts from the Git repository.
Drop the case from the CheckSourceTree test. This will also
prevent the test from running and failing when CVS is found
but Git is not.
ac2e45d Provide std::ios_base typedef on GCC < 3
28c46ca cmNewLineStyle: Use cmStandardIncludes.h
75e83e9 cmNewLineStyle: Remove trailing comma in enum
be6502c bootstrap: Include cmNewLineStyle in build
a087490 Add NEWLINE_STYLE option to configure_file (#3957)
This patch adds two macros cmake_push_check_state() and
cmake_pop_check_state(), which can be used to save and restore
the contents of the CMAKE_REQUIRED_xxx variables.
Alex
8bd3e51 Absoft: Enable FortranCInterface check in Fortran test
d7b376b Absoft: Detect implicit link libraries on Linux and Mac
ac5b999 Add Absoft Fortran compiler id and basic flags
Use the "-X -v" flag to the Absoft front-end to pass "-v" to the gcc it
invokes under the hood. Teach CMakeParseImplicitLinkInfo to exclude
linker version lines from consideration as link lines. Fix parsing of
Sun's linker search path option "-Y..." to avoid conflict with the Mac
linker option "-Y<num>".
Also, comment out all "debugging" calls to message() that helped
us interpret the output on other platforms when running on the
dashboard clients.
Using ERROR_QUIET avoids unnecessary stderr output while calling
external tools to determine the processor count. If there's an
error parsing the output, we set the count to 0 anyhow.
Also, the test will fail on a CMake dashboard run if the count
comes back equal to 0.
Now that the code is "done"-ish, remove the debugging output.
Expect no output on stdout or stderr when calling the
ProcessorCount function from now on.
More dev work remains to be done here. Removing test failure
condition until that dev work is complete, so it does not
mask or hide other, more important failures, on the dashboard.