Skip to content

[Regression] CMake 3.18.0 generates invalid CTestTestfile.cmake on macos

Unfortunately I cannot test it, since I don't have a mac, but on our travis CI setup all macos builds started failing as soon as CMake 3.18.0 was accepted in homebrew, with lots of these warnings:

CMake Warning (dev) at <build>/tests/<path>/CTestTestfile.cmake:7:
  Syntax Warning in cmake code at column 12
  
  Argument not separated from preceding token by whitespace.
Call Stack (most recent call first):
  <build>/tests/CTestTestfile.cmake:8 (subdirs)
  CTestTestfile.cmake:11 (subdirs)
This warning is for project developers.  Use -Wno-dev to suppress it.

This is an example of failing build, where I managed to print the content of the broken CTestTestfile.cmake file:

https://travis-ci.org/github/drdanz/yarp/jobs/711527001#L5043-L5112

The problem seems to be that the name of the test in the generated file is wrapped in inverted commas twice, i.e.

add_test(""test_name"" [...])
set_tests_properties(""test_name"" [...])

instead of

add_test("test_name" [...])
set_tests_properties("test_name" [...])
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information