summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-12-20 17:58:15 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-12-20 17:58:31 (GMT)
commit1a81acdd229f066d7b50df984d84904e923a2f28 (patch)
tree7a6fae41cc5f80e934a8da8af17bf4b5a90ecc1d /Source
parent2fafa66b182aff78bb9f26928a61379e5a9b2f1c (diff)
parentf5126badd8aadd307a2d38b215cb1dc2ff43647d (diff)
downloadCMake-1a81acdd229f066d7b50df984d84904e923a2f28.zip
CMake-1a81acdd229f066d7b50df984d84904e923a2f28.tar.gz
CMake-1a81acdd229f066d7b50df984d84904e923a2f28.tar.bz2
Merge topic 'add_custom_command-depends-path'
f5126badd8 add_custom_command: convert DEPENDS path arguments to absolute paths a5f44ec925 cmAddCustomCommandCommand: remove unnecessary braces Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4148
Diffstat (limited to 'Source')
-rw-r--r--Source/cmAddCustomCommandCommand.cxx4
-rw-r--r--Source/cmCustomCommandGenerator.cxx4
2 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 52fc5d5..995088c 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -261,9 +261,9 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
case doing_target:
target = copy;
break;
- case doing_depends: {
+ case doing_depends:
depends.push_back(copy);
- } break;
+ break;
case doing_outputs:
outputs.push_back(filename);
break;
diff --git a/Source/cmCustomCommandGenerator.cxx b/Source/cmCustomCommandGenerator.cxx
index bce27c2..c568253 100644
--- a/Source/cmCustomCommandGenerator.cxx
+++ b/Source/cmCustomCommandGenerator.cxx
@@ -8,6 +8,7 @@
#include <cmext/algorithm>
+#include "cmAlgorithms.h"
#include "cmCustomCommand.h"
#include "cmCustomCommandLines.h"
#include "cmGeneratorExpression.h"
@@ -29,6 +30,9 @@ void AppendPaths(const std::vector<std::string>& inputs,
cmExpandedList(cge->Evaluate(lg, config));
for (std::string& it : result) {
cmSystemTools::ConvertToUnixSlashes(it);
+ if (cmContains(it, '/') && !cmSystemTools::FileIsFullPath(it)) {
+ it = cmStrCat(lg->GetMakefile()->GetCurrentBinaryDirectory(), '/', it);
+ }
if (cmSystemTools::FileIsFullPath(it)) {
it = cmSystemTools::CollapseFullPath(it);
}