Project

General

Profile

Bug #1539

Build fails if xml/fftw include path contains older gmock

Added by Roland Schulz about 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
build system
Target version:
Affected version - extra info:
5.0
Affected version:
Difficulty:
uncategorized
Close

Description

If the include path added for xml/fftw also contains gmock than the external gmock headers instead of the internal ones are used, because the include folder order is wrong.

Associated revisions

Revision d2221de6 (diff)
Added by Teemu Murtola about 3 years ago

Adjust include directory order for some corner cases

Always add headers found from the source/build tree to the beginning of
the list of include paths, such that they are preferred over those
potentially found in other non-system directories.

Fixes #1539

Change-Id: Id79634073fea5b10f250128db8ab08019a7f9e21

Revision 411d1811 (diff)
Added by Teemu Murtola almost 2 years ago

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
over them.

Fixes #1844.

Change-Id: Ib536c24a0d13c6538f78daac145dc8d38135819d

History

#1 Updated by Teemu Murtola about 3 years ago

In general, this is an unsolvable problem if the system contains multiple copies of some headers at different versions in different paths. That said, it should be simple to put our internal include paths first. You probably get very interesting failures if you install an older Gromacs to the same prefix where, e.g., libxml2 is. ;-)

#2 Updated by Gerrit Code Review Bot about 3 years ago

Gerrit received a related patchset '1' for Issue #1539.
Uploader: Teemu Murtola ()
Change-Id: Id79634073fea5b10f250128db8ab08019a7f9e21
Gerrit URL: https://gerrit.gromacs.org/3733

#3 Updated by Teemu Murtola about 3 years ago

  • Category set to build system
  • Status changed from New to Fix uploaded
  • Assignee set to Teemu Murtola
  • Target version set to 5.0.1

Didn't test the fix uploaded to Gerrit, but this should be the general approach.

#4 Updated by Teemu Murtola about 3 years ago

  • Status changed from Fix uploaded to Closed
  • Affected version - extra info set to 5.0

#5 Updated by Gerrit Code Review Bot almost 2 years ago

Gerrit received a related patchset '1' for Issue #1539.
Uploader: Teemu Murtola ()
Change-Id: Ib536c24a0d13c6538f78daac145dc8d38135819d
Gerrit URL: https://gerrit.gromacs.org/5221

Also available in: Atom PDF