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

2016-09-06 Thread Steve Lorimer
Ok, thanks Brad On 5 September 2016 at 22:42, Brad King 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 becau

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

2016-09-05 Thread Brad King
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 onl

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

2016-09-05 Thread Steve Lorimer
I have the following directory structure: src/ + foo/ | +--- foobar/ + bar/ src/CMakeLists adds the foo and bar subdirectories src/foo/CMakeLists adds the foobar subdirectory src/foobar/CMakeLists and src/bar/CMakeLists create 2 executables (foobar and bar) $ cat src/CMakeLists.txt c