[cmake-developers] Review request: extract-cmMessenger branch

Daniel Pfeifer daniel at pfeifer-mail.de
Thu Jun 9 17:24:33 EDT 2016


On Thu, Jun 9, 2016 at 2:17 PM, Brad King <brad.king at kitware.com> wrote:
> On 06/09/2016 05:06 AM, Tobias Hunger wrote:
>> CMake Error at src/1/app/CMakeLists.txt:70 (add_custom_target):
>>   Cannot find source file:
>>
>>     unknownFile.qml
>>
>>   Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
>>
>>
>> CMake Error at src/1/CMakeLists.txt:8 (add_subdirectory):
>>   add_subdirectory given source "app1" which is not an existing directory.
>
> This is meant to be the canonical style, and the IssueMessage
> infrastructure produces it.  Not everything has been converted
> to use it though.

I have rebased again and pushed to my github clone:
https://github.com/purpleKarrot/CMake/commits/extract-cmMessenger

If I am not mistaken, the second commit improves consistency of this
canonical style. The error messages became simpler. I for one never
understood what "include could not find load file" really meant.

However, the tests currently fail. I am unsure whether the
implementation should be "fixed" or whether the tests should be
adapted. Example:

  Expected stderr to match:

   expect-err> ^CMake Warning \(dev\) at
message-internal-warning.cmake:3 \(include\):
   expect-err>   A logical block opening on the line
   expect-err>
   expect-err>
.*Tests/RunCMake/message/message-internal-warning.cmake:4 \(macro\)
   expect-err>
   expect-err>   closes on the line
   expect-err>
   expect-err>
.*Tests/RunCMake/message/message-internal-warning.cmake:5 \(endmacro\)
   expect-err>
   expect-err>   with mis-matching arguments.
   expect-err> Call Stack \(most recent call first\):
   expect-err>   CMakeLists.txt:3 \(include\)
   expect-err> This warning is for project developers.  Use -Wno-dev
to suppress it.$

  Actual stderr:

   actual-err> CMake Warning (dev) in message-internal-warning.cmake:
   actual-err>   A logical block opening on the line
   actual-err>
   actual-err>
/home/daniel/Projects/CMake/Tests/RunCMake/message/message-internal-warning.cmake:4
(macro)
   actual-err>
   actual-err>   closes on the line
   actual-err>
   actual-err>
/home/daniel/Projects/CMake/Tests/RunCMake/message/message-internal-warning.cmake:5
(endmacro)
   actual-err>
   actual-err>   with mis-matching arguments.
   actual-err> Call Stack (most recent call first):
   actual-err>   CMakeLists.txt:3 (include)
   actual-err> This warning is for project developers.  Use -Wno-dev
to suppress it.


I assume the actual stderr is preferred and the expectation should be
changed. The mismatch is between line 4 and 5. It does not seem useful
to report an error in line 3.


More information about the cmake-developers mailing list