<div dir="ltr">Dear users,<div><br></div><div>Today I tried to bootstrap our app with CMake 3.5.2. Unfortunately it caused problems in one of our custom functions we created. This is for the Visual Studio 2013 64bit generator.</div><div><br></div><div>We have a function to create tests that accepts an 'INCLUDES' parameter, and we tend to use generator expressions to pass include directories from other libraries in the solution, i.e. something like this:</div><div><br></div><div>add_test(</div><div>    TARGET TestName</div><div>    INCLUDES</div><div>        $<TARGET_PROPERTY:Lib1,INTERFACE_INCLUDE_DIRECTORIES><br></div><div>        $<TARGET_PROPERTY:Lib2,INCLUDE_DIRECTORIES></div><div>     LIBRARIES</div><div>         AnotherLib</div><div>         YetAnotherLib</div><div>    SOURCES</div><div>        TestSource1.cpp</div><div>        TestSource2.cpp</div><div>)</div><div><br></div><div>Inside the function definition we use cmake_parse_arguments to parse these arguments, i.e. something like this:</div><div>function(add_test)</div><div>     cmake_parse_arguments(</div><div>     PARSED_ARGS</div><div>     ""</div><div>     "TARGET"</div><div>     "SOURCES;LIBRARIES;INCLUDES"</div><div>     ${ARGN}</div><div>)</div><div><br></div><div>If I now inspect the value of ${PARSED_ARGS_INCLUDES} I see the result I at least expected, namely "$<TARGET_PROPERTY:Lib1,INTERFACE_INCLUDE_DIRECTORIES>;$<TARGET_PROPERTY:Lib2,INCLUDE_DIRECTORIES>". This value is passed on to target_include_directories inside the function, like so:</div><div>target_include_directories(${PARSED_ARGS_TARGET} </div><div>  PRIVATE ${PARSE_ARGS_INCLUDES}</div><div>)</div><div><br></div><div>It is this line that starts producing unexplainable errors that look like this:</div><div><div>CMake Error in ../CMakeLists.txt:</div><div>  Found relative path while evaluating include directories of</div><div>  "TestName":</div><div><br></div><div>    "PTARGET_PROPERTY:Lib1,INTERFACE_INCLUDE_DIRECTORIES>"</div></div><div><br></div><div>The first letter, here 'P', can be many letters, it seems some random character appear here, including non-printable characters.</div><div><br></div><div>What am I looking at here? Are we using some functionality that was removed or changed from CMake 3.5.2. From the release notes I don't see anything that could be related.</div><div><br></div><div>Sincerely,</div><div>Jakob</div><div><br></div><div><br></div><div><br></div></div>