From bb8e13e3c9aaf3257d324f8c108e6f49301681e4 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Tue, 7 Feb 2012 08:39:01 -0800 Subject: [PATCH] Add support for -I command-line argument to specify #include search directories. --- ispc.h | 4 ++++ main.cpp | 10 ++++++++++ module.cpp | 14 ++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/ispc.h b/ispc.h index 5f25ebe4..59c9140f 100644 --- a/ispc.h +++ b/ispc.h @@ -423,6 +423,10 @@ struct Globals { /** Arguments to pass along to the C pre-processor, if it is run on the program before compilation. */ std::vector cppArgs; + + /** Additional user-provided directories to search when processing + #include directives in the preprocessor. */ + std::vector includePath; }; enum { diff --git a/main.cpp b/main.cpp index 6168f1c2..7b8c66d5 100644 --- a/main.cpp +++ b/main.cpp @@ -103,6 +103,7 @@ usage(int ret) { printf(" [--help]\t\t\t\tPrint help\n"); printf(" [--help-dev]\t\t\tPrint help for developer options\n"); printf(" [-h /--header-outfile=]\tOutput filename for header\n"); + printf(" [-I ]\t\t\t\tAdd to #include file search path\n"); printf(" [--instrument]\t\t\tEmit instrumentation to gather performance data\n"); printf(" [--math-lib=