diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2018-11-14 13:37:52 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2018-11-22 08:39:12 +0000 |
commit | f37ce9ab84400a45752787b9e015a7919c8771bd (patch) | |
tree | f8ea6bedc1dd39c36deaea764922f7cb11ff9250 /cmake/QtBaseCMakeTesting.cmake | |
parent | 3acebfe6eb9ff0c97ab0e79f9f0b35835a4df57a (diff) |
CMake: Add option to run cmake build tests
Use "cmake -DBUILD_CMAKE_TESTING=ON" to enable running cmake build system
tests with ctest.
Change-Id: I0a32e2d1771c9bbb0df013d0d955a9b58b1d4b79
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'cmake/QtBaseCMakeTesting.cmake')
-rw-r--r-- | cmake/QtBaseCMakeTesting.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmake/QtBaseCMakeTesting.cmake b/cmake/QtBaseCMakeTesting.cmake new file mode 100644 index 0000000000..662ac8f498 --- /dev/null +++ b/cmake/QtBaseCMakeTesting.cmake @@ -0,0 +1,9 @@ +## Test the cmake build system: +option(BUILD_CMAKE_TESTING "Build tests for the Qt build system" OFF) +mark_as_advanced(BUILD_CMAKE_TESTING) + +if(BUILD_CMAKE_TESTING) + add_subdirectory("${PROJECT_SOURCE_DIR}/cmake/tests") +endif() + + |