diff options
author | Brad King <brad.king@kitware.com> | 2015-01-27 15:57:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-01-28 14:06:21 (GMT) |
commit | 9259d7788193ad23aa429652af983afc3bc4a953 (patch) | |
tree | 2d0755aa1fd32caf1071f6e1b78acf5dea60b59e /Source | |
parent | 57622bd19d3fd013038d34f497b106a7e2bfd26d (diff) | |
download | CMake-9259d7788193ad23aa429652af983afc3bc4a953.zip CMake-9259d7788193ad23aa429652af983afc3bc4a953.tar.gz CMake-9259d7788193ad23aa429652af983afc3bc4a953.tar.bz2 |
Normalize OBJECT_DEPENDS paths to match custom commands (#15366)
Custom command path normalization added in commit v3.1.0-rc1~471^2
(add_custom_command: Normalize OUTPUT and DEPENDS paths, 2014-05-28)
broke use of OBJECT_DEPENDS to bring in custom commands because the
latter paths were not normalized too. Normalize them and add a test
case.
Reported-by: Daniel v. Gerpen
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 8 | ||||
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 14b5a92..0c60237 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -676,6 +676,14 @@ void cmTargetTraceDependencies::Trace() { std::vector<std::string> objDeps; cmSystemTools::ExpandListArgument(additionalDeps, objDeps); + for(std::vector<std::string>::iterator odi = objDeps.begin(); + odi != objDeps.end(); ++odi) + { + if (cmSystemTools::FileIsFullPath(*odi)) + { + *odi = cmSystemTools::CollapseFullPath(*odi); + } + } this->FollowNames(objDeps); } diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index b8cc5fb..33000d6 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -600,6 +600,14 @@ cmNinjaTargetGenerator if(const char* objectDeps = source->GetProperty("OBJECT_DEPENDS")) { std::vector<std::string> depList; cmSystemTools::ExpandListArgument(objectDeps, depList); + for(std::vector<std::string>::iterator odi = depList.begin(); + odi != depList.end(); ++odi) + { + if (cmSystemTools::FileIsFullPath(*odi)) + { + *odi = cmSystemTools::CollapseFullPath(*odi); + } + } std::transform(depList.begin(), depList.end(), std::back_inserter(implicitDeps), MapToNinjaPath()); } |