Allow to install syntax files instead of having them in a resource
ClosedPublic

Authored by cullmann on Aug 22 2018, 2:57 PM.

Details

Summary

Given the license of some files is dubious, this allows MIT loving people to install them as files and not bundling them.

Test Plan

make works
make test fails ATM, but that needs more love if that idea is accepted at all.

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
cullmann created this revision.Aug 22 2018, 2:57 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptAug 22 2018, 2:57 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
cullmann requested review of this revision.Aug 22 2018, 2:57 PM

I am fine with this change. I want a review from Volker, through .

BTW, slightly related as idea: I think it would be nice to add a function Definition Downloader::setDownloadLocation() or similar that allows to have a custom download location. This would match nicely with Repository::addCustomSearchPath().

vkrause accepted this revision.Aug 22 2018, 5:10 PM

makes sense

This revision is now accepted and ready to land.Aug 22 2018, 5:10 PM
cullmann updated this revision to Diff 40242.Aug 22 2018, 6:08 PM

Update that allows

make test

to succeed, even before one does make install.

cullmann requested review of this revision.Aug 22 2018, 6:08 PM

Updated patch to allow make test to work.

dhaumann accepted this revision.Aug 22 2018, 7:05 PM
This revision is now accepted and ready to land.Aug 22 2018, 7:05 PM
This revision was automatically updated to reflect the committed changes.
kfunk added a subscriber: kfunk.Oct 23 2018, 10:27 PM
kfunk added inline comments.
data/CMakeLists.txt
3

Note: The Ninja generator doesn't like this:

CMake Warning (dev):
  Policy CMP0058 is not set: Ninja requires custom command byproducts to be
  explicit.  Run "cmake --help-policy CMP0058" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  This project specifies custom command DEPENDS on files in the build tree
  that are not specified as the OUTPUT or BYPRODUCTS of any
  add_custom_command or add_custom_target:

   data/syntax/css-php.xml
   data/syntax/html-php.xml
   data/syntax/javascript-php.xml

  For compatibility with versions of CMake that did not have the BYPRODUCTS
  option, CMake is generating phony rules for such files to convince 'ninja'
  to build.

  Project authors should add the missing BYPRODUCTS or OUTPUT options to the
  custom commands that produce these files.
This warning is for project developers.  Use -Wno-dev to suppress it.

There must be a way to implement this feature and keep using add_custom_command...? Using execute_process() is usually a bad sign (tm). Note that these commands will be executed each CMake run(!)

cullmann reopened this revision.Oct 24 2018, 4:34 AM

If you have ideas how, patches are welcome.

This revision is now accepted and ready to land.Oct 24 2018, 4:34 AM
cullmann closed this revision.Mar 4 2019, 6:41 PM

If somebody has an fix for the CMake thingy, please open a new diffusion for that.