[cmake-developers] targets with the same name as their enclosing directory can't be built when in that directory.

Steve Lorimer steve.lorimer at gmail.com
Tue Sep 6 19:25:52 EDT 2016


Ok, thanks Brad

On 5 September 2016 at 22:42, Brad King <brad.king at kitware.com> wrote:

> On 09/05/2016 04:22 AM, Steve Lorimer wrote:
> > $ cat src/foo/foobar/CMakeLists.txt
> > add_executable(foobar main.cpp)
> > However, if I am in the build/foo directory, then nothing happens
> > if I "make foobar".
>
> That's because the foobar target is defined in build/foo/foobar.
> The target names are only buildable in the top level or in the
> subdirectory that defines a given target.
>
> -Brad
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160907/d2cc8068/attachment-0001.html>


More information about the cmake-developers mailing list