summaryrefslogtreecommitdiff
path: root/Source/cmConditionEvaluator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-03-29 10:01:40 -0400
committerBrad King <brad.king@kitware.com>2016-03-29 10:02:17 -0400
commit02fce523a13c8e4cda0c95334b480bb87336ed1c (patch)
tree9e355e7c0b2d7fc8224b36427900e3775183f1f4 /Source/cmConditionEvaluator.cxx
parent90f24f016e93d18f6a244b39fd21c68355bdbe48 (diff)
downloadcmake-02fce523a13c8e4cda0c95334b480bb87336ed1c.tar.gz
cmConditionEvaluator: Drop unnecessary path conversion
In commit v3.4.0-rc2~1^2 (cmIfCommand: Issue CMP0054 warning with appropriate context, 2015-10-20) we added construction of a cmListFileContext with conversion of the calling file path. This code path runs on every condition (e.g. `if()`) and so the path conversion has a noticeable performance cost. Fortunately the only use of this context is for insertion into cmMakefile::CMP0054ReportedIds so we do not need to convert the path. Simply drop the conversion.
Diffstat (limited to 'Source/cmConditionEvaluator.cxx')
-rw-r--r--Source/cmConditionEvaluator.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/Source/cmConditionEvaluator.cxx b/Source/cmConditionEvaluator.cxx
index 6a0ebec2d2..4bfe69748d 100644
--- a/Source/cmConditionEvaluator.cxx
+++ b/Source/cmConditionEvaluator.cxx
@@ -105,7 +105,7 @@ bool cmConditionEvaluator::IsTrue(
}
cmListFileContext cmConditionEvaluator::GetConditionContext(
- cmMakefile* mf,
+ cmMakefile*,
const cmCommandContext& command,
const std::string& filePath)
{
@@ -113,13 +113,6 @@ cmListFileContext cmConditionEvaluator::GetConditionContext(
cmListFileContext::FromCommandContext(
command,
filePath);
-
- if(!mf->GetCMakeInstance()->GetIsInTryCompile())
- {
- cmOutputConverter converter(mf->GetStateSnapshot());
- context.FilePath = converter.Convert(context.FilePath,
- cmOutputConverter::HOME);
- }
return context;
}