Build system does not respect GMX_EXTERNAL_BOOST=OFF
At least on OS X, having boost installed in /opt/local/include (together with some other dependencies), setting
GMX_EXTERNAL_BOOST=OFF still uses the external boost, even though
gmx --version in the final version claims that internal boost was used (the version number is still from the external version).
I really cannot understand why this does not work, or whether this is the same on all platforms. The include directory for the internal boost is the first on the compiler command line, and uses -isystem.
Use include_directories(SYSTEM ...) consistently
Apparently, at least some compilers treat -isystem differently from -I
in that no matter what the order on the command line is, -I always takes
precedence. This means that some of the
include_directories(BEFORE SYSTEM ...)
did not work correctly, and in particular GMX_EXTERNAL_BOOST=OFF was
broken. Likely also #1539 was (again) broken.
Make all includes that come from outside the source tree use SYSTEM, so
that the include directory for internal boost still takes precedence
#1 Updated by Teemu Murtola about 4 years ago
- Affected version changed from 5.x to 5.1
This seems to be caused by the use of -isystem instead of -I. -I takes precedence over -isystem, no matter what the include order is. Not sure whether there is some meaningful workaround, or what all compilers are affected. So it was broken by the last-minute merge of Idcdf3872b5a169e8690721bbe83922a4ab280da8 before 5.1, and so 5.1.x is affected.