When building utfcpp (and other packages) a CMake warning is issued.
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_EXPORT_COMPILE_COMMANDS
Before this change the following files are present:
$ cd build.LibreELEC-Generic.x86_64-13.0-devel/build
$ find utfcpp-4.0.6 -name build.ninja
utfcpp-4.0.6/.x86_64-libreelec-linux-gnu/build.ninja
$ find utfcpp-4.0.6 -name compile_commands.json
$ find soxr-0.1.3 -name build.ninja
soxr-0.1.3/.x86_64-libreelec-linux-gnu/build.ninja
$ find soxr-0.1.3 -name compile_commands.json
soxr-0.1.3/.x86_64-libreelec-linux-gnu/compile_commands.json
When removing the define CMAKE_EXPORT_COMPILE_COMMANDS:
--- a/scripts/build
+++ b/scripts/build
@@ -147,8 +147,7 @@
MESON_BUILD_TYPE="plain"
fi
-CMAKE_GENERATOR_NINJA="-GNinja \
- -DCMAKE_EXPORT_COMPILE_COMMANDS=ON"
+CMAKE_GENERATOR_NINJA="-GNinja"
# configure TARGET build defaults
TARGET_CONFIGURE_OPTS="--host=${TARGET_NAME} \
The resulting build do not have the warning with utfcpp but the files
compile_commands.json are not created (as expected.)
$ find utfcpp-4.0.6 -name build.ninja
utfcpp-4.0.6/.x86_64-libreelec-linux-gnu/build.ninja
$ find utfcpp-4.0.6 -name compile_commands.json
$ find soxr-0.1.3 -name build.ninja
soxr-0.1.3/.x86_64-libreelec-linux-gnu/build.ninja
$ find soxr-0.1.3 -name compile_commands.json
With the change to declare CMAKE_EXPORT_COMPILE_COMMANDS as an environment
variable the warning is not preset with utfcpp and the compile_commands.json
are created, matching the current functionaility but without the warning.
Ref:
- https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html
- This is initialized by the CMAKE_EXPORT_COMPILE_COMMANDS environment variable.
- https://cmake.org/cmake/help/latest/envvar/CMAKE_EXPORT_COMPILE_COMMANDS.html#envvar:CMAKE_EXPORT_COMPILE_COMMANDS
- https://stackoverflow.com/questions/20059670/how-to-use-cmake-export-compile-commands
LibreELEC
LibreELEC is a 'Just enough OS' Linux distribution for the award-winning Kodi software on popular mediacentre hardware. Further information on the project can be found on the LibreELEC website.
Issues & Support
Please ask questions in the LibreELEC forum: Help & Support or ask a member of project staff in the #libreelec IRC channel on Libera.Chat. Please report bugs via GitHub Issues.
Donations
Contributions towards current project funding goals can be made via OpenCollective.
License
LibreELEC original code is released under GPLv2.
Copyright
As LibreELEC includes code from many upstream projects it has many copyright owners; notably OpenELEC which we forked from after disagreeing with project direction and management, and OpenBricks/GeeXboX the uncredited source of the original 2009 build system. LibreELEC makes no claim of copyright on any upstream code. However all original LibreELEC authored code is copyright LibreELEC.tv. Patches to upstream code have the same license as the upstream project unless specified otherwise. For a complete copyright list please checkout the source code to examine license headers. Unless expressly stated otherwise all code submitted to the LibreELEC project (in any form) is licensed under GPLv2 and copyright is donated to the project. This approach gives the project freedom to maintain the code without the overhead of preserving contact with every submitter, e.g. GPLv3. You are free to retain copyright by adding your copyright header to each submitted code page. If you submit code that is not your own work it is your responsibility to place a header stating the copyright.