mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-04 13:19:51 -05:00
add_custom_target: Add output checks for custom target byproducts
Use the output checks for byproducts of add_custom_command also for byproducts of add_custom_target.
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "cmCheckCustomOutputs.h"
|
||||
#include "cmCustomCommandLines.h"
|
||||
#include "cmExecutionStatus.h"
|
||||
#include "cmGeneratorExpression.h"
|
||||
@@ -205,6 +206,11 @@ bool cmAddCustomTargetCommand(std::vector<std::string> const& args,
|
||||
return false;
|
||||
}
|
||||
|
||||
// Make sure the byproduct names and locations are safe.
|
||||
if (!cmCheckCustomOutputs(byproducts, "BYPRODUCTS", status)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Add the utility target to the makefile.
|
||||
bool escapeOldStyle = !verbatim;
|
||||
cmTarget* target = mf.AddUtilityCommand(
|
||||
|
||||
Reference in New Issue
Block a user