Skip to content

WIP: Use separate command for directory creation in install targets

Frank Winklmeier requested to merge fwinkl/atlasexternals:makedir into master

Instead of

add_custom_command( OUTPUT foo/bar
  COMMAND cmake -E make_directory foo
  COMMAND ... )

which will execute a make_directory each time a "bar" needs to be installed, use a separate command:

add_custom_command( OUTPUT foo
  COMMAND cmake -E make_directory foo )

add_custom_command( OUTPUT foo/bar
  COMMAND ...
  DEPENDS foo )

While the make_directory call silently succeeds in case the directory already exists, it's still a small overhead and stat call on the filesystem. Since this happens for every single (header, python, ...) file that is being installed, this could add up. It also makes our verbose build log files a bit more sane.

Edited by Frank Winklmeier

Merge request reports