diff options
author | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-23 20:18:36 (GMT) |
---|---|---|
committer | Daniel Eiband <daniel.eiband@brainlab.com> | 2019-09-23 20:18:36 (GMT) |
commit | a1cc6b4447787b84777fdf9a860e8c39f0f4a090 (patch) | |
tree | 2c6bda9df6651b5732f6eef005333c15a3d07d65 /Source/cmAddCustomTargetCommand.cxx | |
parent | cbb861ade85e3b7e550bb1f150513b237efc1f02 (diff) | |
download | CMake-a1cc6b4447787b84777fdf9a860e8c39f0f4a090.zip CMake-a1cc6b4447787b84777fdf9a860e8c39f0f4a090.tar.gz CMake-a1cc6b4447787b84777fdf9a860e8c39f0f4a090.tar.bz2 |
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.
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r-- | Source/cmAddCustomTargetCommand.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 9fd1234..b580c43 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -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( |