[cmake-developers] Testing CMake
Brad King
brad.king at kitware.com
Thu Oct 24 09:49:27 EDT 2013
On 10/24/2013 09:31 AM, Nils Gladitz wrote:
> I've been wondering about the test setup in Tests/CMakeLists.txt.
> Is CMAKE_CTEST_COMMAND in that context the newly build ctest or the old
> one that performed the build?
It is the newly built one.
> Does CMAKE_CTEST_COMMAND when invoked with "--build-and-test" perhaps
> run that build and test with the new binaries?
It uses the new binaries.
> Some of the scripts reference ancient versions of cmake and I am scared
> of breaking them by introducing features that are not available in them.
I don't think there is any reason not to update cmake_minimum_required
in any test to the current version. Those lines just "rot" when there
is not a reason to update them (like getting a policy set by default).
> Are there additional reasons why newer features should be kept out of
> certain scripts?
New features only need to be kept out of Tests/CMakeLists.txt code and
the subdirectories it enters via add_subdirectory. Those are processed
by the existing CMake used to perform the build. All the test case
CMakeLists.txt files get processed with the just-built binaries when
the tests run.
-Brad
More information about the cmake-developers
mailing list