Template for C, with CMake
ClosedPublic

Authored by windblows on Feb 13 2018, 9:42 PM.

Details

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
windblows created this revision.Feb 13 2018, 9:42 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptFeb 13 2018, 9:42 PM
windblows requested review of this revision.Feb 13 2018, 9:42 PM
apol added a subscriber: apol.Feb 13 2018, 11:47 PM

LGTM, nitpicking.

app_templates/c/CMake/cmake_plainc/main.c
8

return 0; is best, the compiler will turn it into an exit call.

+1

app_templates/c/CMake/cmake_plainc/CMakeLists.txt
2

This being a template, better use a lower number here, like 3.0
Nothing in the template requires that current version 3.10, so no need to be that demanding by default((e.g. KDevelop's code also still only requires 3.0 :) ).

app_templates/c/CMake/cmake_plainc/cmake_plainc.kdevtemplate
5

All the translations can be removed.

KDE's automated translation system has a separate database with all the translations, which is filled directly by the translators with translations (actually pp files in a svn repo).
Once per day (actually CET night) a script runs over the sources and pulls all strings which need to be translated, and pushes back translations that are stored in-source like in this kdevtemplate file. And anything which is not in the database will be removed.

So once this is in, and due to the original strings not yet extracted into the database and thus no translations existing, all the translations here will be removed on the first run of the script. So no need to have them here from the start.

Just keep the
'''
Name=CMake C
'''
line.

38

Same as for Name translations. Just keep the

Comment=Simple CMake-based C application

line.

windblows updated this revision to Diff 27130.Feb 14 2018, 1:23 AM
windblows marked 4 inline comments as done.Feb 14 2018, 1:40 AM
windblows added inline comments.
app_templates/c/CMake/cmake_plainc/main.c
8

This goes down to personal preference, discussing this is trivial so I'll comply. That excludes the need for stdlib.h but I am keeping it for the sake of convenience.

windblows marked 2 inline comments as done.Feb 14 2018, 2:52 AM
kossebau added a comment.EditedFeb 14 2018, 12:55 PM

You do not yet have earned push rights for KDE git servers, right? So one of us would do this for you.
What is the author data (firstname lastname <email>) we can use to give credit to you here?

Name: Lucas
Lastname: A. V. Dantas
Email: lucasdantas at yandex dot com

This revision was not accepted when it landed; it landed in state Needs Review.Feb 18 2018, 7:22 PM
Closed by commit R32:39f851d3e424: Template for C, with CMake (authored by Lucas A. V. Dantas <lucasdantas@yandex.com>, committed by kossebau). · Explain Why
This revision was automatically updated to reflect the committed changes.