Created
February 24, 2015 20:00
-
-
Save jdswinbank/8c00e56b5bfb5af31578 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/python/lsst/sconsUtils/dependencies.py b/python/lsst/sconsUtils/dependencies.py | |
index 98d89cd..d837e1d 100644 | |
--- a/python/lsst/sconsUtils/dependencies.py | |
+++ b/python/lsst/sconsUtils/dependencies.py | |
@@ -72,10 +72,11 @@ def configure(packageName, versionString=None, eupsProduct=None, eupsProductPath | |
# XCPPPATH is a new variable defined by sconsUtils - it's like CPPPATH, but the headers | |
# found there aren't treated as dependencies. This can make scons a lot faster. | |
state.env['XCPPPATH'] = [] | |
+ state.env['XCPPPREFIX'] = "-isystem " | |
state.env['_CPPINCFLAGS'] = \ | |
"$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)}"\ | |
- " ${_concat(INCPREFIX, XCPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)" | |
- state.env['_SWIGINCFLAGS'] = state.env['_CPPINCFLAGS'].replace("CPPPATH", "SWIGPATH") | |
+ " ${_concat(XCPPPREFIX, XCPPPATH, INCSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)" | |
+ state.env['_SWIGINCFLAGS'] = state.env['_CPPINCFLAGS'].replace("CPPPATH", "SWIGPATH").replace("XCPPPREFIX", "SWIGINCPREFIX") | |
if state.env.linkFarmDir: | |
for d in [state.env.linkFarmDir, "#"]: |
I've only checked clang and g++. There was some discussion on HipChat as to what compiler support was required, but no particular conclusion.
The above was a quick & dirty hack; if we were to adopt something like this, we could presumably concoct something to check if the compiler supports it. I didn't get a feeling of great support when I first mooted the idea, so I've not spent any longer thinking about it (although I think there were only a couple of folks awake when I raised it, so maybe others feel differently).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does this work for all compilers? I see that clang, icc, and g++ at least 4.4+ support this so maybe we don't need to check (those are the compilers that sconsUtils currently knows about)