summaryrefslogtreecommitdiffstats
path: root/Source/cmAddCustomTargetCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddCustomTargetCommand.cxx')
-rw-r--r--Source/cmAddCustomTargetCommand.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index aa98d89..104065f 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -4,7 +4,6 @@
#include <utility>
-#include "cmCheckCustomOutputs.h"
#include "cmCustomCommandLines.h"
#include "cmExecutionStatus.h"
#include "cmGeneratorExpression.h"
@@ -120,12 +119,16 @@ bool cmAddCustomTargetCommand(std::vector<std::string> const& args,
break;
case doing_byproducts: {
std::string filename;
- if (!cmSystemTools::FileIsFullPath(copy)) {
+ if (!cmSystemTools::FileIsFullPath(copy) &&
+ cmGeneratorExpression::Find(copy) != 0) {
filename = cmStrCat(mf.GetCurrentBinaryDirectory(), '/');
}
filename += copy;
cmSystemTools::ConvertToUnixSlashes(filename);
- byproducts.push_back(cmSystemTools::CollapseFullPath(filename));
+ if (cmSystemTools::FileIsFullPath(filename)) {
+ filename = cmSystemTools::CollapseFullPath(filename);
+ }
+ byproducts.push_back(filename);
} break;
case doing_depends: {
std::string dep = copy;
@@ -206,11 +209,6 @@ 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(