Review Request 126185: Make the KAppTemplate CMake module global
Alex Merry
alex.merry at kde.org
Wed Dec 16 19:10:13 UTC 2015
> On Dec. 12, 2015, 3:40 p.m., Alex Merry wrote:
> > Ooh, also, please write a unit test. I can help with that if you find the idea of writing a CMake-based unit test daunting, but you can look in the tests directory for inspiration.
>
> Marco Martin wrote:
> I'm not sure what the test should do...
> perhaps having in the repo a tarball and a source template, make it generate and then compare the files?
>
> Alex Merry wrote:
> Yes, that would work. Or you could have a source template, and check the installed file can be extracted and check the extracted contents. Don't forget to make sure that files you think should be excluded are in fact omitted.
>
> Marco Martin wrote:
> if i try to use kde_add_app_templates from a run_test.cmake i get the message KDETemplateGenerator.cmake:97 (add_custom_target):
> Command add_custom_target() is not scriptable
> any idea what it could be?
Ah, you'll need to do a project-style test. See ECMPoQmToolsTest, or ECMInstallIconsTest. The idea is you create a CMakeLists.txt file as though it were a project using this module, and make, say, a check_tree.cmake script to check that the right things were installed in the right places. Lines 124-131 of tests/CMakeLists.txt are what run ECMInstallIconsTest.
- Alex
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126185/#review89391
-----------------------------------------------------------
On Dec. 16, 2015, 12:25 p.m., Marco Martin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126185/
> -----------------------------------------------------------
>
> (Updated Dec. 16, 2015, 12:25 p.m.)
>
>
> Review request for Build System, KDE Frameworks, Plasma, Aleix Pol Gonzalez, and Simon Wächter.
>
>
> Repository: extra-cmake-modules
>
>
> Description
> -------
>
> templates are very useful as teaching tool in order to make
> a minimal application that uses a certain framework.
> templates in the KAppTemplate repository will always get forgotten
> (plus kapptemplate is not really necessary as they work in kdevelop as well)
> An ideal situation would be frameworks having templates in their own repos
> with templates of barebone apps using the main framework features.
> In order to do that, the cmake stuff needed in order to correctly install
> a template needs to be ported to a place avaiable to all frameworks
>
>
> Diffs
> -----
>
> kde-modules/KDEInstallDirs.cmake b7cd34d
> kde-modules/KDEPackageAppTemplates.cmake PRE-CREATION
> tests/CMakeLists.txt 1a66f56
> tests/KDEPackageAppTemplatesTest/CMakeLists.txt PRE-CREATION
> tests/KDEPackageAppTemplatesTest/qml-plasmoid/CMakeLists.txt PRE-CREATION
> tests/KDEPackageAppTemplatesTest/qml-plasmoid/Messages.sh PRE-CREATION
> tests/KDEPackageAppTemplatesTest/qml-plasmoid/README PRE-CREATION
> tests/KDEPackageAppTemplatesTest/qml-plasmoid/package/contents/images/pairs.svgz PRE-CREATION
> tests/KDEPackageAppTemplatesTest/qml-plasmoid/package/contents/ui/main.qml PRE-CREATION
> tests/KDEPackageAppTemplatesTest/qml-plasmoid/package/metadata.desktop PRE-CREATION
> tests/KDEPackageAppTemplatesTest/qml-plasmoid/qml-plasmoid.kdevtemplate PRE-CREATION
> tests/KDEPackageAppTemplatesTest/qml-plasmoid/qml-plasmoid.png PRE-CREATION
> tests/KDEPackageAppTemplatesTest/run_test.cmake.config PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/126185/diff/
>
>
> Testing
> -------
>
> done some templates installed by plasma-framework
>
>
> Thanks,
>
> Marco Martin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20151216/34ebf28b/attachment-0001.html>
More information about the Plasma-devel
mailing list