Commit 7a6e7342 authored by Heiko Becker's avatar Heiko Becker

Honor BUILD_TESTING

Summary:
Although ecm_optional_add_subdirectory(autotests) allows to skip
building the autotests with -DBUILD_autotests=FALSE, it doesn't seem
reasonable to have two options controlling similar behaviour and
BUILD_TESTING is the de-facto standard for cmake and already used
when discovering Qt5::Test.

Furthermore it avoids a cmake warning when BUILD_TESTING is set to
FALSE because Qt5::Test is passed to target_link_libraries but
isn't a valid target.

Test Plan: Warning disappears and builds successfully

Reviewers: #kate

Subscribers: kwrite-devel

Tags: #kate

Differential Revision: https://phabricator.kde.org/D14538
parent f2df3311
......@@ -29,4 +29,6 @@ target_link_libraries(katebacktracebrowserplugin
install( TARGETS katebacktracebrowserplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor )
############# unit tests ################
ecm_optional_add_subdirectory (autotests)
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
......@@ -27,4 +27,6 @@ install(TARGETS katefiletreeplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktextedito
kcoreaddons_desktop_to_json (katefiletreeplugin katefiletreeplugin.desktop)
############# unit tests ################
ecm_optional_add_subdirectory (autotests)
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
......@@ -47,4 +47,6 @@ install(TARGETS kateprojectplugin DESTINATION ${PLUGIN_INSTALL_DIR}/ktexteditor
install( FILES kateproject.example DESTINATION ${DATA_INSTALL_DIR}/kateproject )
############# unit tests ################
ecm_optional_add_subdirectory (autotests)
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
......@@ -149,4 +149,6 @@ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/org.kde.kate.appdata.xml DESTINAT
ecm_install_icons(ICONS ${KATE_ICONS_PNG} ${KATE_ICONS_SVG} DESTINATION ${ICON_INSTALL_DIR} THEME hicolor)
# automatic unit tests
ecm_optional_add_subdirectory (autotests)
if (BUILD_TESTING)
add_subdirectory(autotests)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment