When running CMake from the build tree the CMAKE_ROOT is the
entire source tree. Fix the CMP0017 check to be specific to
the Modules/ directory under CMAKE_ROOT so that Tests/ does
not count. Fix the FindPackageTest modules to include FPHSA
by full path from CMAKE_ROOT so that they do not include the
local FPHSA which reports an error meant to test that CMP0017
works.
Add an undocumented CMake_TEST_EXTERNAL_CMAKE option to name an external
CMake 'bin' directory. Skip all main CMake binary builds and instead
configure the Tests directory to run using the external CMake provided.
This will provide a means to exercise the CMake test suite generating
for target platforms and compilers with which the CMake source does not
build. That will allow us to raise the level of C++ features required
of a compiler to build our source while retaining tests for generating
projects with older compiler tools.
In the ExportImport, Fortran, and MacRuntimePath tests the
CMAKE_TEST_MAKEPROGRAM variable is used to pass an explicit request for
a CMAKE_MAKE_PROGRAM value to be used when building the inner projects.
Rename these use cases to CMake_TEST_NESTED_MAKE_PROGRAM.
Follow the convention of naming variables related to the CMake build
itself as "CMake_" rather than "CMAKE_". While at it, consolidate the
code computing CMake_TEST_DEVENV to be more localized.
Drop the option to test with a different generator and make program than
was used to build. This was used only to test support for the Open
Watcom compiler which at one time could not build CMake. Instead we
will allow CMake to be configured to skip building binaries and just run
the test suite using an external CMake (in a future change).
For now leave the two option variables hard-coded to the old option
defaults until code can be updated to stop using them.
KWSys now has its own dashboard and test clients that run on all the
machines where we test CMake. We no longer need a test inside CMake to
test KWSys independently.
Recently used cmake-gui locations are searched only on Windows because
the Windows registry is used to record the values. This behavior is
historical and may be removed by a policy in the future so rather than
implementing it on other platforms simply document the current behavior.
For example it is now possible to do:
feature_summary(WHAT ENABLED_FEATURES
DISABLED_FEATURES)
That produces an output like:
--
-- The following features have been enabled:
* Feature1
* Feature2
-- The following features have been disabled:
* Feature2
Skipping the lists that are empty.
Without this patch this would require to do:
message(STATUS "")
feature_summary(WHAT ENABLED_FEATURES
DESCRIPTION "The following features have been enabled:")
feature_summary(WHAT DISABLED_FEATURES
DESCRIPTION "The following features have been disabled:")
And empty lists would not be skipped.
The behaviour when WHAT has a single argument (ALL or any option) is
unchanged.
This command does not support generator expressions. The documentation
was mistakenly extended to claim it in commit v3.0.0-rc1~60^2~3 (Help: Mark
up the buildsystem commands documentation, 2014-02-03).
When possible, get consistent version of the Python interpreter, headers path,
and library.
Now find_package(PythonLibs) internally calls find_package(PythonInterp
QUIET) and uses the resulting PYTHON_VERSION_MAJOR and
PYTHON_VERSION_MINOR to prefer these versions when looking for the
header path and library. The Python_ADDITIONAL_VERSIONS variable has
priority over the interpreter version.
Co-Author: Adam Wolf
Co-Author: Gert Wollny <gw.fossdev@gmail.com>