QA: Tidy qa_utils headers

Move into own include directory for clarity. Also allows qa_utils
to use its own private headers in qa/qa_utils without exposing them
through the target_include_directories directive.
This commit is contained in:
John Beard 2019-01-28 10:36:54 +00:00 committed by Wayne Stambaugh
parent 47ec2fd5ba
commit 33bc74a4a2
18 changed files with 28 additions and 34 deletions

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <utility_program.h>
#include <qa_utils/utility_program.h>
#include "tools/coroutines/coroutine_tools.h"
#include "tools/io_benchmark/io_benchmark.h"

View File

@ -2,7 +2,7 @@
#ifndef COROUTINES_UTILTY_H
#define COROUTINES_UTILTY_H
#include <utility_program.h>
#include <qa_utils/utility_program.h>
/// A tool to test a simple coroutine
extern KI_TEST::UTILITY_PROGRAM coroutine_tool;

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2017 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2017-2019 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -36,7 +36,7 @@
#include <wx/wfstream.h>
#include <wx/filename.h>
#include "stdstream_line_reader.h"
#include <qa_utils/stdstream_line_reader.h>
using CLOCK = std::chrono::steady_clock;

View File

@ -1,7 +1,7 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2018 KiCad Developers, see CHANGELOG.TXT for contributors.
* Copyright (C) 2018-2019 KiCad Developers, see CHANGELOG.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -21,11 +21,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef IO_BENCHMARK_H
#define IO_BENCHMARK_H
#ifndef QA_COMMON_TOOLS_IO_BENCHMARK__H
#define QA_COMMON_TOOLS_IO_BENCHMARK__H
#include <utility_program.h>
#include <qa_utils/utility_program.h>
extern KI_TEST::UTILITY_PROGRAM io_benchmark_tool;
#endif // IO_BENCHMARK_H
#endif // QA_COMMON_TOOLS_IO_BENCHMARK__H

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <utility_program.h>
#include <qa_utils/utility_program.h>
#include "tools/drc_tool/drc_tool.h"
#include "tools/pcb_parser/pcb_parser_tool.h"

View File

@ -36,8 +36,8 @@
#include <drc/courtyard_overlap.h>
#include <drc/drc_marker_factory.h>
#include <scoped_timer.h>
#include <stdstream_line_reader.h>
#include <qa_utils/scoped_timer.h>
#include <qa_utils/stdstream_line_reader.h>
using DRC_DURATION = std::chrono::microseconds;

View File

@ -24,7 +24,7 @@
#ifndef PCBNEW_TOOLS_DRC_TOOL_H
#define PCBNEW_TOOLS_DRC_TOOL_H
#include <utility_program.h>
#include <qa_utils/utility_program.h>
/// A tool to run DRC tools on KiCad PCBs from the command line
extern KI_TEST::UTILITY_PROGRAM drc_tool;

View File

@ -37,8 +37,8 @@
#include <wx/cmdline.h>
#include <scoped_timer.h>
#include <stdstream_line_reader.h>
#include <qa_utils/scoped_timer.h>
#include <qa_utils/stdstream_line_reader.h>
using PARSE_DURATION = std::chrono::microseconds;

View File

@ -24,7 +24,7 @@
#ifndef PCBNEW_TOOLS_PCB_PARSER_UTILITY_H
#define PCBNEW_TOOLS_PCB_PARSER_UTILITY_H
#include <utility_program.h>
#include <qa_utils/utility_program.h>
/// A tool to parse kicad PCBs from the command line
extern KI_TEST::UTILITY_PROGRAM pcb_parser_tool;

View File

@ -24,7 +24,7 @@
#ifndef PCBNEW_TOOLS_POLYGON_GENERATOR_UTILITY_H
#define PCBNEW_TOOLS_POLYGON_GENERATOR_UTILITY_H
#include <utility_program.h>
#include <qa_utils/utility_program.h>
/// A tool to parse kicad PCBs from the command line
extern KI_TEST::UTILITY_PROGRAM polygon_generator_tool;

View File

@ -24,7 +24,7 @@
#ifndef PCBNEW_TOOLS_POLYGON_TRIANGULATION_UTILITY_H
#define PCBNEW_TOOLS_POLYGON_TRIANGULATION_UTILITY_H
#include <utility_program.h>
#include <qa_utils/utility_program.h>
/// A tool to parse kicad PCBs from the command line
extern KI_TEST::UTILITY_PROGRAM polygon_triangulation_tool;

View File

@ -30,7 +30,7 @@
#include <class_board.h>
#include <stdstream_line_reader.h>
#include <qa_utils/stdstream_line_reader.h>
namespace KI_TEST
{

View File

@ -42,5 +42,4 @@ target_link_libraries( qa_utils
target_include_directories( qa_utils PUBLIC
include
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@ -32,15 +32,13 @@
* ON construction, a timer is started, and on destruction, the timer is
* ended, and the time difference is written into the given duration
*/
template<typename DURATION>
class SCOPED_TIMER
template <typename DURATION> class SCOPED_TIMER
{
using CLOCK = std::chrono::steady_clock;
using TIME_PT = std::chrono::time_point<CLOCK>;
public:
SCOPED_TIMER( DURATION& aDuration ):
m_duration( aDuration )
SCOPED_TIMER( DURATION& aDuration ) : m_duration( aDuration )
{
m_start = CLOCK::now();
}
@ -54,7 +52,6 @@ public:
}
private:
DURATION& m_duration;
TIME_PT m_start;
};

View File

@ -28,8 +28,8 @@
#include <richio.h>
#include <istream>
#include <fstream>
#include <istream>
/**
* LINE_READER that wraps a given std::istream instance.
@ -37,7 +37,6 @@
class STDISTREAM_LINE_READER : public LINE_READER
{
public:
STDISTREAM_LINE_READER();
~STDISTREAM_LINE_READER();
@ -62,7 +61,6 @@ private:
class IFSTREAM_LINE_READER : public STDISTREAM_LINE_READER
{
public:
IFSTREAM_LINE_READER( const wxFileName& aFileName );
void Rewind();

View File

@ -21,7 +21,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "stdstream_line_reader.h"
#include <qa_utils/stdstream_line_reader.h>
#include <ios>

View File

@ -20,7 +20,7 @@
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "utility_program.h"
#include <qa_utils/utility_program.h>
#include <wx/msgout.h>