[CMake] Custom targets and subdirectories...
Tim Kientzle
kientzle at freebsd.org
Wed Aug 19 01:44:10 EDT 2009
Tim Kientzle wrote:
> I'm having trouble with a custom target that
> depends on another custom target defined in a
> subdirectory. Here's a much-simplified version
> of what I'm trying to do:
Turns out the subdirectory is a red herring.
Here's a much simpler demonstration of the bug:
$ cat CMakeLists.txt
PROJECT(foobar C)
ADD_EXECUTABLE(foo foo.c)
ADD_CUSTOM_TARGET(run_foo DEPENDS foo COMMAND foo)
ADD_CUSTOM_TARGET(run_all DEPENDS run_foo)
$ make run_all
[100%] Built target foo
Scanning dependencies of target run_foo
foo
[100%] Built target run_foo
Scanning dependencies of target run_all
make: don't know how to make run_foo. Stop
*** Error code 2
More information about the CMake
mailing list