mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 22:59:56 -05:00
Merge topic 'cmoutputconverter-simplify'
b6a957c969 cmOutputConverter: move ConvertToRelativePath to cmStateDirectory.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2831
This commit is contained in:
@@ -33,7 +33,6 @@
|
||||
#include "cmMSVC60LinkLineComputer.h"
|
||||
#include "cmMakefile.h"
|
||||
#include "cmMessageType.h"
|
||||
#include "cmOutputConverter.h"
|
||||
#include "cmPolicies.h"
|
||||
#include "cmSourceFile.h"
|
||||
#include "cmState.h"
|
||||
@@ -2794,8 +2793,9 @@ void cmGlobalGenerator::AddRuleHash(const std::vector<std::string>& outputs,
|
||||
}
|
||||
|
||||
// Shorten the output name (in expected use case).
|
||||
cmOutputConverter converter(this->GetMakefiles()[0]->GetStateSnapshot());
|
||||
std::string fname = converter.ConvertToRelativePath(
|
||||
cmStateDirectory cmDir =
|
||||
this->GetMakefiles()[0]->GetStateSnapshot().GetDirectory();
|
||||
std::string fname = cmDir.ConvertToRelPathIfNotContained(
|
||||
this->GetMakefiles()[0]->GetState()->GetBinaryDirectory(), outputs[0]);
|
||||
|
||||
// Associate the hash with this output.
|
||||
|
||||
Reference in New Issue
Block a user