Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ FetchContent_Declare(
GIT_SHALLOW 1
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(nlohmann_json)
FetchContent_Declare(
thread_pool
GIT_REPOSITORY https://github.com/bshoshany/thread-pool.git
GIT_TAG v5.0.0
GIT_SHALLOW 1
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(nlohmann_json thread_pool)

add_executable(duplo ${SOURCES})

Expand All @@ -34,7 +41,10 @@ set_target_properties(duplo PROPERTIES
target_compile_definitions(duplo PRIVATE DUPLO_VERSION=${DUPLO_VERSION})
target_include_directories(duplo PRIVATE src/include/)
find_package(nlohmann_json 3.11.3 REQUIRED)
target_link_libraries(duplo PRIVATE nlohmann_json::nlohmann_json)
add_library(thread_pool INTERFACE)
target_include_directories(thread_pool INTERFACE ${thread_pool_SOURCE_DIR}/include)
find_package(Threads REQUIRED)
target_link_libraries(duplo PRIVATE nlohmann_json::nlohmann_json thread_pool Threads::Threads)

if(NOT MSVC)
target_compile_options(duplo PRIVATE -Wall -Wextra -pedantic -Werror)
Expand Down
8 changes: 5 additions & 3 deletions src/ConsoleExporter.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "Block.h"
#include "ConsoleExporter.h"
#include "FileExporter.h"

Expand All @@ -16,7 +17,8 @@ void ConsoleExporter::WriteFooter(
const Options& options,
int files,
long locsTotal,
const ProcessResult& processResult) {
unsigned tot_dup_blocks,
unsigned tot_dup_lines) {
Out()
<< "Configuration:"
<< std::endl
Expand All @@ -42,10 +44,10 @@ void ConsoleExporter::WriteFooter(
<< locsTotal
<< std::endl
<< " Duplicate lines of code: "
<< processResult.DuplicateLines()
<< tot_dup_lines
<< std::endl
<< " Total "
<< processResult.Blocks()
<< tot_dup_blocks
<< " duplicate block(s) found."
<< std::endl
<< std::endl;
Expand Down
Loading
Loading