Repository navigation
fix(install): install LICENSE and NOTICE with the compiler - #250
Merged
Merged
Conversation
The test installs the `licenses` component of the build tree into a temporary prefix, which builds nothing, and compares LICENSE and NOTICE in share/doc/coretrace-compiler with the sources. No install rule carries them yet: the install succeeds, the files are missing, and the test is marked as an expected failure until they are. Refs #249
Apache-2.0 asks redistributions to give recipients a copy of the License (section 4(a)) and Derivative Works to carry the attribution notices of NOTICE (section 4(d)). cmake --install now puts both files in share/doc/coretrace-compiler, in a component of their own, and the install test no longer expects a failure. Refs #249
SizzleUnrlsd
marked this pull request as ready for review
November 9, 2026 03:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #249
Summary
cmake --installinstalledbin/cc, the libraries inlib/andinclude/, but neitherLICENSEnorNOTICE. Apache-2.0 sets two conditions on redistribution:NOTICE.An install prefix copied or packaged as it is carried neither file.
Change
CMakeLists.txt:install(FILES LICENSE NOTICE DESTINATION share/doc/coretrace-compiler COMPONENT licenses). A plaincmake --installinstalls every component, these files included. Thelicensescomponent lets a test install them alone, without building anything.Test
Install.ShipsLicenseAndNotice(test/unit/check_installed_licenses.cmake) installs thelicensescomponent of the build tree into a temporary prefix. It passes--configwhen a multi-config generator built the tree. It then fails unlessshare/doc/coretrace-compiler/LICENSEandNOTICEexist and match the sources byte for byte.The test lands first as an expected failure (
WILL_FAIL), which the fix removes. Run locally on macOS, on a configured build tree with nothing built:cmake --installsucceeds and installs nothing; the test fails onnot installed: share/doc/coretrace-compiler/LICENSELICENSEandNOTICENOTICEin the sources that differs from the installed onediffers from NOTICE of the sourcesIn CI at aa57784, which merges main after #248, the test passes in the 18 jobs that run the test suite:
It passed in the same jobs at 28ea589, before that merge (42394558228, 42394558175).
The ThreadSanitizer job runs the runtime's tests only, and the Docker job is skipped on pull requests.
test/examples/test_install_layout.py, which installs everything, passes too. clang-format, license-compliance and the commit conventions pass.Not covered
LICENSEandNOTICEfrom the sources itself. Whether itscmake --installnow also getsshare/doc/coretrace-compiler/was not checked.NOTICE.