Commit 4043239e authored by Himanshu Vishwakarma's avatar Himanshu Vishwakarma Committed by Johnny Jazeix
Browse files

tests, use ECMAddTests and optional compilation of unit tests

parent ee0fe952
......@@ -38,11 +38,13 @@ set(CMAKE_PREFIX_PATH "${Qt5_DIR}/lib/cmake/Qt5")
# KDE po to qm tools
if(ECM_FOUND)
include(ECMAddTests)
include(ECMPoQmTools)
if (IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/po")
ecm_install_po_files_as_qm(po)
endif()
option(BUILD_TESTING "Build and enable unit tests" OFF)
include(ECMCoverageOption)
endif(ECM_FOUND)
......@@ -467,10 +469,10 @@ if(SAILFISHOS)
endif()
# only enable unit tests for linux
if(UNIX AND NOT ANDROID AND NOT SAILFISHOS)
if(BUILD_TESTING)
enable_testing()
add_subdirectory(tests)
endif(UNIX AND NOT ANDROID AND NOT SAILFISHOS)
endif(BUILD_TESTING)
add_custom_target(binaries)
add_dependencies(binaries ${GCOMPRIS_EXECUTABLE_NAME} rcc_core rcc_menu rcc_activities all_activities)
......@@ -5,10 +5,10 @@ Official repository
The official repository requires a KDE developer account, we will ask regular
contributors to get an account and work on the KDE repository.
http://quickgit.kde.org/?p=gcompris.git
https://cgit.kde.org/gcompris.git
For new developers and those interested only in smaller contributions use the
GitHub repository.
https://phabricator.kde.org/ or GitHub repository.
Source code from GitHub
......@@ -73,3 +73,8 @@ Start QtCreator and select Open Project and open CMakeLists.txt in the
gcompris-qt root directory. Follow the wizard instructions.
Use the buttons on the lower left side to build, run, and debug GCompris.
More Details
------------
Go To this Link:
http://gcompris.net/wiki/Qt_Quick_development_process
......@@ -65,8 +65,8 @@ else()
add_executable(${GCOMPRIS_EXECUTABLE_NAME} ${gcompris_SRCS} ${gcompris_RES})
endif()
# do not build shared library for android, it crashes
if(NOT ANDROID)
# only build the lib for testing purpose
if(BUILD_TESTING)
add_library(gcompris_core SHARED ${gcompris_SRCS})
qt5_use_modules(gcompris_core ${used_qt_modules})
endif()
......
......@@ -8,6 +8,4 @@ set(CORE_TEST_LIBRARIES
Qt5::Test
)
add_executable(CoreActivityInfoTest ActivityInfoTest.cpp)
target_link_libraries(CoreActivityInfoTest ${CORE_TEST_LIBRARIES})
add_test(NAME CoreActivityInfoTest COMMAND $<TARGET_FILE:CoreActivityInfoTest>)
ecm_add_test(ActivityInfoTest.cpp TEST_NAME CoreActivityInfoTest LINK_LIBRARIES ${CORE_TEST_LIBRARIES})
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