Brandon Van Every wrote: > On 6/17/07, Philippe Fremy <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I want a directory to be built when a custom target is executed. >> >> I tried something like this: >> >> add_custom_target( >> doc_libyzis >> COMMAND FILE( MAKE_DIRECTORY >> ${CMAKE_CURRENT_SOURCE_DIR}/../apidoc ) > > COMMANDs for a custom target are not CMake commands. They are > commands you could run on a command line.
Yeah, I understood that now. You can't use FILE, you > have to use a system-specific "mkdir" or some such. You could write a > CMake script with FILE in it, and then invoke the CMake script with > "cmake -P", if you want something guaranteed to be portable. It is ironic that a running cmake instance, that supports platform agnostic directory creation, is not able to do that inside a rule and has to fallback an calling a second cmake instance for that. cheers, Philippe _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake