From cf6891934297c51cd12bac3278b6e59df5e42f06 Mon Sep 17 00:00:00 2001 From: Vikas Rangarajan Date: Tue, 23 Mar 2010 12:31:32 -0700 Subject: Initial merge of local changes with master, main changes : - Distinguish between system and non-system headers for compilers that support it (g++) - only recurse dependencies for direct includes of current source --- .../net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java') diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java index 0fce11b..560b608 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCompatibleCCompiler.java @@ -142,9 +142,17 @@ public abstract class GccCompatibleCCompiler extends CommandLineCCompiler { protected File[] getEnvironmentIncludePath() { return CUtil.getPathFromEnvironment("INCLUDE", ":"); } + // Darren Sargent 22Oct2008 - added overloads to properly handle system paths public String getIncludeDirSwitch(String includeDir) { + return getIncludeDirSwitch(includeDir, false); + } + public String getIncludeDirSwitch(String includeDir, boolean isSystem) { + if ( isSystem ) { + return "-isystem" + includeDir; + } else { return "-I" + includeDir; } + } public void getUndefineSwitch(StringBuffer buffer, String define) { buffer.append("-U"); buffer.append(define); -- cgit v1.2.3