From e76d81a0d5b6e7d06e9812470b518b733b60ceef Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Sun, 31 Mar 2019 16:10:35 +0200 Subject: [PATCH] Include src/training when exporting compile commands with cmake `cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..` is used to get the file compile_commands.json which is required by clang-tidy. Export compile commands for all source files, not only those from the default build, so clang-tidy can cover all source files. Signed-off-by: Stefan Weil --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7b6df919..92fb6809 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,6 +233,9 @@ include_directories(src/opencl) include_directories(src/textord) include_directories(src/viewer) include_directories(src/wordrec) +if(CMAKE_EXPORT_COMPILE_COMMANDS) +include_directories(src/training) +endif() ######################################## # LIBRARY tesseract