[CMake] FILE command in make_custom_target
Brandon Van Every
bvanevery at gmail.com
Mon Jun 18 10:26:39 EDT 2007
On 6/17/07, Philippe Fremy <phil at freehackers.org> 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. 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.
Come to think of it, "cmake -E mkdir mydirectoryname" is supposed to
have been added, according to bug #3776. But it isn't in CMake 2.4.6
on Windows. So, I'm reopening the bug.
Cheers,
Brandon Van Every
More information about the CMake
mailing list