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.
Is this pull request associated with an issue(s)?
Closes #116
Description
Implements @josephgarnier's suggested fix for the issues described in #116.
TODOs
Testing
It is quite difficult to test this override to message functionality programmatically. However, I have tested this implementation manually with a slightly more extensive set than set forth in the issue and seen no issues. I have also only tested with
message(andmessage(STATUS, though, not the other possible message modes. Here is my testing method (on a Linux system):mkdir test_116_fix cd test_116_fixtest_116_fix/CMakeLists.txtfor the testing with the same contents as this file: https://github.com/user-attachments/files/21456416/CMakeLists.txt (contents are pasted below)cmake -H. -Bbuild -DFETCHCONTENT_SOURCE_DIR_CMAKE_TEST="$PWD/cmaketest"[cmaketest]output matches the[vanilla]output. (I just ran it in two side-by-side terminals and manually compared, but I'm sure you could usediffas well)Testing Project CMakeLists.txt contents
I understand potential hesitancy to download files from the Internet that you will need to run (even if it is uploaded on GitHub like the link above). I have included the contents of the the testing project
CMakeLists.txtbelow so you can see the file contents before downloading it or for reference if the link above stops working, but without interrupting the flow of the testing steps with a massive file.Contents of
CMakeLists.txt: