On 11/16/2011 06:36 PM, Jookia wrote:
> I've actually used that workaround, but it seems dirty as it shows up in 
> IDE targets like Visual Studio or other IDEs or makefiles. In fact, I 
> kind of like the 'generating ..../docs' part of the makefile.
> 
> Would it just be smarter to rename the target to 'documentation'?

Of course, that's also possible, but then, the documentation target and
the documentation directory would not be named the same. Alternatively,
you might leave out the WORKING_DIRECTORY clause, add another COMMAND
"cmake -E make_directory" to the target and use "cmake -E chdir":

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(DOCS NONE)
SET(CMAKE_VERBOSE_MAKEFILE ON)
ADD_CUSTOM_TARGET(docs
    COMMAND ${CMAKE_COMMAND} -E
        make_directory ${CMAKE_BINARY_DIR}/docs
    COMMAND ${CMAKE_COMMAND} -E
        chdir ${CMAKE_BINARY_DIR}/docs pwd)

Presumably, the directory's additional creations carries no weight.

Regards,

Michael
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to