mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-26 00:20:06 -06:00
Fix some of the semantics of the depfile, add error handling, and refactor cmGccDepfileLexerHelper.
20 lines
524 B
C++
20 lines
524 B
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
|
#include "cmGccDepfileReader.h"
|
|
|
|
#include <type_traits>
|
|
#include <utility>
|
|
|
|
#include <cm/optional>
|
|
|
|
#include "cmGccDepfileLexerHelper.h"
|
|
|
|
cm::optional<cmGccDepfileContent> cmReadGccDepfile(const char* filePath)
|
|
{
|
|
cmGccDepfileLexerHelper helper;
|
|
if (helper.readFile(filePath)) {
|
|
return cm::make_optional(std::move(helper).extractContent());
|
|
}
|
|
return cm::nullopt;
|
|
}
|