From 5afde58c8ee6cb8b2f4cb1dbf1c0fb08a2435ff6 Mon Sep 17 00:00:00 2001 From: Derek Bruening Date: Fri, 10 Mar 2017 12:26:43 -0500 Subject: [PATCH] i#2006 generalize drcachesim: facilitate tool header installation (#2283) Removes subdir references from the key headers needed for offline-only tools to make it easier to install the headers for third-party tools. --- clients/drcachesim/CMakeLists.txt | 4 ++++ clients/drcachesim/analysis_tool.h | 6 ++++-- clients/drcachesim/analyzer.h | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/clients/drcachesim/CMakeLists.txt b/clients/drcachesim/CMakeLists.txt index 8fcc7d22bfd..ebaf47b1ec1 100644 --- a/clients/drcachesim/CMakeLists.txt +++ b/clients/drcachesim/CMakeLists.txt @@ -83,6 +83,10 @@ use_DynamoRIO_extension(drcachesim droption) use_DynamoRIO_extension(drcachesim drcovlib_static) use_DynamoRIO_extension(drcachesim drutil_static) +# This is to avoid common/ in analysis_tool.h's include of memref.h, to make +# it easier for installation of needed tool headers into a single dir. +include_directories(common) + set(file_analyzer_tool_srcs analyzer.cpp common/trace_entry.cpp diff --git a/clients/drcachesim/analysis_tool.h b/clients/drcachesim/analysis_tool.h index c0a083dc52d..b129d07af97 100644 --- a/clients/drcachesim/analysis_tool.h +++ b/clients/drcachesim/analysis_tool.h @@ -1,5 +1,5 @@ /* ********************************************************** - * Copyright (c) 2016 Google, Inc. All rights reserved. + * Copyright (c) 2016-2017 Google, Inc. All rights reserved. * **********************************************************/ /* @@ -36,7 +36,9 @@ #ifndef _ANALYSIS_TOOL_H_ #define _ANALYSIS_TOOL_H_ 1 -#include "common/memref.h" +// To support installation of headers for analysis tools into a single +// separate directory we omit common/ here and rely on -I. +#include "memref.h" class analysis_tool_t { diff --git a/clients/drcachesim/analyzer.h b/clients/drcachesim/analyzer.h index 2171b25aa4b..f65f03c6b38 100644 --- a/clients/drcachesim/analyzer.h +++ b/clients/drcachesim/analyzer.h @@ -39,9 +39,12 @@ #define _ANALYZER_H_ 1 #include "analysis_tool.h" -#include "reader/reader.h" #include +// We avoid reader.h here to make it easier for standalone tools +// along the lines of histogram_launcher. +class reader_t; + class analyzer_t { public: