Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 788def27 authored by Jan Grulich's avatar Jan Grulich

Simplify tests and make them optional

parent 71833088
......@@ -25,7 +25,6 @@ find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
Network
Quick
Widgets
Test
)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED
......@@ -96,6 +95,10 @@ add_subdirectory(kded)
add_subdirectory(kcm)
add_subdirectory(libs)
add_subdirectory(vpn)
add_subdirectory(tests)
# Enable unit testing
if (BUILD_TESTING)
add_subdirectory(tests)
endif ()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. )
include_directories( ${CMAKE_SOURCE_DIR}/libs/editor )
########### next target ###############
include(ECMAddTests)
find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Test)
set_package_properties(Qt5Test PROPERTIES PURPOSE "Required for autotests")
ecm_add_test(
simpleipv6test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleipv6addressvalidator.cpp
TEST_NAME simpleipv6test
LINK_LIBRARIES Qt5::Test Qt5::Widgets
LINK_LIBRARIES Qt5::Test plasmanm_editor
)
ecm_add_test(
simpleipv4test.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleipv4addressvalidator.cpp
TEST_NAME simpleipv4test
LINK_LIBRARIES Qt5::Test Qt5::Widgets
LINK_LIBRARIES Qt5::Test plasmanm_editor
)
ecm_add_test(
simpleiplisttest.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleipv4addressvalidator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleipv6addressvalidator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../libs/editor/simpleiplistvalidator.cpp
TEST_NAME simpleiplisttest
LINK_LIBRARIES Qt5::Test Qt5::Widgets
LINK_LIBRARIES Qt5::Test plasmanm_editor
)
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