1
1

hwloc/external.h: fix a clash with external HWLOC_VERSION[*]

Some macros defined by the embedded hwloc ends up in opal_config.h
because hwloc configury m4 files are slurped into Open MPI.  These
macros are not required here, and they might conflict with an external
hwloc install, so simply #undef them in hwloc/external/external.h
after including <opal_config.h> but before including the external
<hwloc.h>.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Этот коммит содержится в:
Jeff Squyres 2019-01-29 07:36:01 -08:00
родитель 352b667323
Коммит f22b7d4f46

21
opal/mca/hwloc/external/external.h поставляемый
Просмотреть файл

@ -1,6 +1,6 @@
/*
* Copyright (c) 2011-2017 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2016 Research Organization for Information Science
* Copyright (c) 2011-2019 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2016-2019 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
*
* Copyright (c) 2016-2017 Intel, Inc. All rights reserved.
@ -21,6 +21,23 @@
BEGIN_C_DECLS
#include <opal_config.h>
/* Top-level configure will always configure the embedded hwloc
* component, even if we already know that we'll be using an external
* hwloc (because of complicated reasons). A side-effect of this is
* that the embedded hwloc will AC_DEFINE HWLOC_VERSION (and friends)
* in opal_config.h. If the external hwloc defines a different value
* of HWLOC_VERSION (etc.), we'll get zillions of warnings about the
* two HWLOC_VERSION values not matching. Hence, we undefined all of
* them here (so that the external <hwloc.h> can define them to
* whatever it wants). */
#undef HWLOC_VERSION
#undef HWLOC_VERSION_MAJOR
#undef HWLOC_VERSION_MINOR
#undef HWLOC_VERSION_RELEASE
#undef HWLOC_VERSION_GREEK
#include MCA_hwloc_external_header
/* If the including file requested it, also include the hwloc verbs