[CMake] Empty item list in target_include_directories allowed?

Gregor Jasny gjasny at googlemail.com
Wed Jul 31 05:38:59 EDT 2013


On 7/29/13 2:26 PM, Gregor Jasny wrote:
> I wonder if cmake should be able to parse the following project file:
>
>    cmake_minimum_required(VERSION 2.8.11)
>    project(Foo)
>
>    add_library(mylib STATIC mylib.c)
>
>    #set(a "a")
>
>    target_include_directories(mylib PUBLIC ${a})
>
>
> The help text for target_include_directories shows the following syntax:
>
>    target_include_directories(<target> [BEFORE
>        <INTERFACE|PUBLIC|PRIVATE> [items1...]
>       [<INTERFACE|PUBLIC|PRIVATE> [items2...] ...])
>
> So I would consider the item list in the [] brackets as optional.
>
> Should I file a bug about it?

Filed as http://www.cmake.org/Bug/view.php?id=14325



More information about the CMake mailing list