On 12/03/2016 06:52 AM, Dan Liew wrote:
> There was a post about this 10 years ago [1], has anything changed since then?

No.  From my response back then:

>> The "clean" target is not a first class target available to
>> CMakeLists.txt code....We do plan to make targets like install
>> and clean first class eventually but it is not yet implemented.

This never happened.  These generator-provided targets have very
different semantics (e.g. per-directory behavior in the Makefile
generator) and that makes it hard to define them in a way that is
visible to client code during configuration.  It may be possible but
will require deep design thought.

> I realise the `clean` target won't be available for all generators but
> for those that do, it would be really nice to able to do something
> like this.
> 
> add_dependencies(clean CleanKLEERuntimes)

Just as `ADDITIONAL_MAKE_CLEAN_FILES` is a make-specific solution I
think something like `ADDITIONAL_MAKE_CLEAN_COMMAND` or perhaps
`ADDITIONAL_MAKE_CLEAN_TARGET` could be offered.  Such configuration
could be interpreted by the makefile generator while generating the
"make clean" target.

-Brad

-- 

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

Reply via email to