Quantcast

When Ninja byproduct is a directory causes `clean` target to fail.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

When Ninja byproduct is a directory causes `clean` target to fail.

Dan Liew
Hi,

I recently added support to a project to build its API documentation [1].

The documentation is generated by doxygen.
I used `add_custom_command()` to run doxygen and I use `BYPRODUCTS` to
specify the output directory that will be generated by doxygen in the
hope that this would tell ninja to remove it when the `clean` target
is run.

However this doesn't work because ninja complains that the directory
isn't empty.
Is `BYPRODUCTS` not supposed to be used with directories, or is this a bug?


[1] https://github.com/Z3Prover/z3/blob/a9d6ef68f02d636d9628a52a257d968a13321752/contrib/cmake/doc/CMakeLists.txt#L59

Thanks,
Dan.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...