From a3b3b431622bd45fbf5b46fdba6acb83809d9d46 Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Mon, 11 Apr 2022 14:46:11 +0000 Subject: [PATCH] Fix build/include lint in samples/ This CL updates the SampleUtils file to use the full path to the header. This required adding the root path into the include directories for the sample utils project in CMake. Bug: dawn:1339 Change-Id: If6abb18a2eefa19ee56b6f889080da67f4a953e3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/86211 Reviewed-by: Corentin Wallez Commit-Queue: Dan Sinclair Auto-Submit: Dan Sinclair --- samples/dawn/CMakeLists.txt | 1 + samples/dawn/CPPLINT.cfg | 1 - samples/dawn/SampleUtils.cpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/dawn/CMakeLists.txt b/samples/dawn/CMakeLists.txt index 07d596edba..eaf697ebc4 100644 --- a/samples/dawn/CMakeLists.txt +++ b/samples/dawn/CMakeLists.txt @@ -14,6 +14,7 @@ add_library(dawn_sample_utils STATIC ${DAWN_DUMMY_FILE}) common_compile_options(dawn_sample_utils) +target_include_directories(dawn_sample_utils PRIVATE ${PROJECT_SOURCE_DIR}) target_sources(dawn_sample_utils PRIVATE "SampleUtils.cpp" "SampleUtils.h" diff --git a/samples/dawn/CPPLINT.cfg b/samples/dawn/CPPLINT.cfg index e6baf5cc10..4eb7dc1073 100644 --- a/samples/dawn/CPPLINT.cfg +++ b/samples/dawn/CPPLINT.cfg @@ -1,5 +1,4 @@ filter=-build/header_guard -filter=-build/include filter=-build/include_order filter=-build/include_what_you_use filter=-readability/casting diff --git a/samples/dawn/SampleUtils.cpp b/samples/dawn/SampleUtils.cpp index db14027c49..fab58bf359 100644 --- a/samples/dawn/SampleUtils.cpp +++ b/samples/dawn/SampleUtils.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "SampleUtils.h" +#include "samples/dawn/SampleUtils.h" #include "GLFW/glfw3.h" #include "dawn/common/Assert.h"