summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCMakePresetsGraph.cxx2
-rw-r--r--Source/cmCMakePresetsGraph.h1
-rw-r--r--Source/cmCMakePresetsGraphReadJSON.cxx26
3 files changed, 0 insertions, 29 deletions
diff --git a/Source/cmCMakePresetsGraph.cxx b/Source/cmCMakePresetsGraph.cxx
index 58dca36..238aa68 100644
--- a/Source/cmCMakePresetsGraph.cxx
+++ b/Source/cmCMakePresetsGraph.cxx
@@ -1014,8 +1014,6 @@ const char* cmCMakePresetsGraph::ResultToString(ReadFileResult result)
"support.";
case ReadFileResult::CYCLIC_INCLUDE:
return "Cyclic include among preset files";
- case ReadFileResult::INCLUDE_OUTSIDE_PROJECT:
- return "File included from outside project directory";
}
return "Unknown error";
diff --git a/Source/cmCMakePresetsGraph.h b/Source/cmCMakePresetsGraph.h
index 02c506f..8581809 100644
--- a/Source/cmCMakePresetsGraph.h
+++ b/Source/cmCMakePresetsGraph.h
@@ -44,7 +44,6 @@ public:
CONDITION_UNSUPPORTED,
TOOLCHAIN_FILE_UNSUPPORTED,
CYCLIC_INCLUDE,
- INCLUDE_OUTSIDE_PROJECT,
};
enum class ArchToolsetStrategy
diff --git a/Source/cmCMakePresetsGraphReadJSON.cxx b/Source/cmCMakePresetsGraphReadJSON.cxx
index ca34124..85cf5be 100644
--- a/Source/cmCMakePresetsGraphReadJSON.cxx
+++ b/Source/cmCMakePresetsGraphReadJSON.cxx
@@ -424,17 +424,6 @@ cmCMakePresetsGraph::ReadFileResult cmCMakePresetsGraph::ReadJSONFile(
{
ReadFileResult result;
- if (rootType == RootType::Project) {
- auto normalizedFilename = cmSystemTools::CollapseFullPath(filename);
-
- auto normalizedProjectDir =
- cmSystemTools::CollapseFullPath(this->SourceDir);
- if (!cmSystemTools::IsSubDirectory(normalizedFilename,
- normalizedProjectDir)) {
- return ReadFileResult::INCLUDE_OUTSIDE_PROJECT;
- }
- }
-
for (auto const& f : this->Files) {
if (cmSystemTools::SameFile(filename, f->Filename)) {
file = f.get();
@@ -444,21 +433,6 @@ cmCMakePresetsGraph::ReadFileResult cmCMakePresetsGraph::ReadJSONFile(
return cmCMakePresetsGraph::ReadFileResult::CYCLIC_INCLUDE;
}
- // Check files included by this file again to make sure they're in the
- // project directory.
- if (rootType == RootType::Project) {
- for (auto* f2 : file->ReachableFiles) {
- if (!cmSystemTools::SameFile(filename, f2->Filename)) {
- File* file2;
- if ((result = this->ReadJSONFile(
- f2->Filename, rootType, ReadReason::Included,
- inProgressFiles, file2)) != ReadFileResult::READ_OK) {
- return result;
- }
- }
- }
- }
-
return cmCMakePresetsGraph::ReadFileResult::READ_OK;
}
}