diff options
author | Kevin Funk <kfunk@kde.org> | 2017-08-07 15:50:25 +0200 |
---|---|---|
committer | Kevin Funk <kfunk@kde.org> | 2017-08-07 22:25:47 +0200 |
commit | b99d2d2c5dedcaba9745dddc1dd7b8d4811babf1 (patch) | |
tree | 593d114cfe6630a1404ecfd2e819be892ae06040 /Jenkinsfile_master_kf5-qt5_linux_gcc | |
parent | 165465ee7116bbbd8c0dd2ae04c2037c45f208a8 (diff) | |
download | extra-cmake-modules-b99d2d2c5dedcaba9745dddc1dd7b8d4811babf1.tar.gz extra-cmake-modules-b99d2d2c5dedcaba9745dddc1dd7b8d4811babf1.tar.bz2 |
RFC: Make ECMAddTests respect BUILD_TESTING
Summary:
Use-case: Make building unit tests optional, by just following the CMake
BUILD_TESTING option.
The usual approach to conditionally build tests is to do:
```
if (BUILD_TESTING)
add_executable(TestOne TestOne.cpp)
target_link_libraries(TestOne my_library)
endif()
```
or:
```
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
```
This patch just turns all calls to ecm_add_test(...) into no-ops if
BUILD_TESTING=OFF.
See:
https://cmake.org/cmake/help/v3.6/module/CTest.html
Reviewers: vkrause
Reviewed By: vkrause
Subscribers: kossebau, vkrause, elvisangelaccio, asturmlechner, apol, #frameworks, #build_system
Tags: #frameworks, #build_system
Differential Revision: https://phabricator.kde.org/D7187
Diffstat (limited to 'Jenkinsfile_master_kf5-qt5_linux_gcc')
0 files changed, 0 insertions, 0 deletions