Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63391 - trunk/tools/inspect
From: daniel_james_at_[hidden]
Date: 2010-06-27 12:40:29


Author: danieljames
Date: 2010-06-27 12:40:28 EDT (Sun, 27 Jun 2010)
New Revision: 63391
URL: http://svn.boost.org/trac/boost/changeset/63391

Log:
Only check for apple macros under boost.

As discussed on the list:
http://lists.boost.org/Archives/boost/2010/06/168213.php
Text files modified:
   trunk/tools/inspect/apple_macro_check.cpp | 8 ++++++++
   1 files changed, 8 insertions(+), 0 deletions(-)

Modified: trunk/tools/inspect/apple_macro_check.cpp
==============================================================================
--- trunk/tools/inspect/apple_macro_check.cpp (original)
+++ trunk/tools/inspect/apple_macro_check.cpp 2010-06-27 12:40:28 EDT (Sun, 27 Jun 2010)
@@ -11,6 +11,9 @@
 #include <functional>
 #include "boost/regex.hpp"
 #include "boost/lexical_cast.hpp"
+#include "boost/filesystem/operations.hpp"
+
+namespace fs = boost::filesystem;
 
 namespace
 {
@@ -59,6 +62,11 @@
     {
       if (contents.find( "boostinspect:" "naapple_macros" ) != string::npos) return;
 
+ // Only check files in the boost directory, as we can avoid including the
+ // apple test headers elsewhere.
+ path relative( relative_to( full_path, fs::initial_path() ), fs::no_check );
+ if ( relative.empty() || *relative.begin() != "boost") return;
+
       boost::sregex_iterator cur(contents.begin(), contents.end(), apple_macro_regex), end;
 
       long errors = 0;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk