mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-09 10:00:12 -05:00
CMake code rely on cmList class for CMake lists management (part. 1)
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "cmsys/RegularExpression.hxx"
|
||||
|
||||
#include "cmGeneratorExpression.h"
|
||||
#include "cmList.h"
|
||||
#include "cmListFileCache.h"
|
||||
#include "cmLocalGenerator.h"
|
||||
#include "cmMakefile.h"
|
||||
@@ -113,7 +114,7 @@ cmFileSet::CompileFileEntries() const
|
||||
std::vector<std::unique_ptr<cmCompiledGeneratorExpression>> result;
|
||||
|
||||
for (auto const& entry : this->FileEntries) {
|
||||
for (auto const& ex : cmExpandedList(entry.Value)) {
|
||||
for (auto const& ex : cmList{ entry.Value }) {
|
||||
cmGeneratorExpression ge(this->CMakeInstance, entry.Backtrace);
|
||||
auto cge = ge.Parse(ex);
|
||||
result.push_back(std::move(cge));
|
||||
@@ -129,7 +130,7 @@ cmFileSet::CompileDirectoryEntries() const
|
||||
std::vector<std::unique_ptr<cmCompiledGeneratorExpression>> result;
|
||||
|
||||
for (auto const& entry : this->DirectoryEntries) {
|
||||
for (auto const& ex : cmExpandedList(entry.Value)) {
|
||||
for (auto const& ex : cmList{ entry.Value }) {
|
||||
cmGeneratorExpression ge(this->CMakeInstance, entry.Backtrace);
|
||||
auto cge = ge.Parse(ex);
|
||||
result.push_back(std::move(cge));
|
||||
@@ -148,7 +149,7 @@ std::vector<std::string> cmFileSet::EvaluateDirectoryEntries(
|
||||
std::vector<std::string> result;
|
||||
for (auto const& cge : cges) {
|
||||
auto entry = cge->Evaluate(lg, config, target, dagChecker);
|
||||
auto dirs = cmExpandedList(entry);
|
||||
cmList dirs{ entry };
|
||||
for (std::string dir : dirs) {
|
||||
if (!cmSystemTools::FileIsFullPath(dir)) {
|
||||
dir = cmStrCat(lg->GetCurrentSourceDirectory(), '/', dir);
|
||||
@@ -184,7 +185,7 @@ void cmFileSet::EvaluateFileEntry(
|
||||
cmGeneratorExpressionDAGChecker* dagChecker) const
|
||||
{
|
||||
auto files = cge->Evaluate(lg, config, target, dagChecker);
|
||||
for (std::string file : cmExpandedList(files)) {
|
||||
for (std::string file : cmList{ files }) {
|
||||
if (!cmSystemTools::FileIsFullPath(file)) {
|
||||
file = cmStrCat(lg->GetCurrentSourceDirectory(), '/', file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user