[cmake-developers] Custom commands with Ninja on Windows
Brad King
brad.king at kitware.com
Mon May 23 10:24:15 EDT 2016
On 05/23/2016 06:48 AM, Martin Ankerl wrote:
> Here is an updated patch
Thanks!
> +#include <cmsys/Base64.h>
This looks unnecessary.
> + const std::string cmdFile = hasher.HashString(cmd.str()) + ".cmd";
> +
> + // TODO fail if can't open file
> + std::ofstream fout(cmdFile);
Please use cmGeneratedFileStream. Also please place the script files in the
CMakeFiles/ directory. See cmake::GetCMakeFilesDirectoryPostSlash callers
for examples.
> - this->BuildCommandLine(cmdLines), this->ConstructComment(ccg),
> + this->BuildCommandLine(cmdLines, false), this->ConstructComment(ccg),
Please also update the call sites for PRE_BUILD, PRE_LINK, and POST_BUILD
custom commands.
Thanks,
-Brad
More information about the cmake-developers
mailing list