1
1

topo/treematch: silence a hwloc related warning

treematch/km_partitioning.c #include "config.h",
but there is no such file when the embedded treematch is used.

In order to prevent the embedded treematch from incorrectly using
the config.h from the embedded hwloc, generate a dummy config.h.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
(cherry picked from commit 0aeb27f77650d3ee97e17e770c9e5aa487d5e1f5)
Этот коммит содержится в:
Gilles Gouaillardet 2019-01-30 13:31:44 +09:00 коммит произвёл Jeff Squyres
родитель c85fd35f27
Коммит a247292275
2 изменённых файлов: 22 добавлений и 2 удалений

Просмотреть файл

@ -5,6 +5,8 @@
# Copyright (c) 2011-2015 INRIA. All rights reserved.
# Copyright (c) 2011-2015 Université Bordeaux 1
# Copyright (c) 2017 IBM Corporation. All rights reserved.
# Copyright (c) 2019 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -67,3 +69,5 @@ noinst_LTLIBRARIES = $(lib)
libmca_topo_treematch_la_SOURCES = $(lib_sources)
libmca_topo_treematch_la_LDFLAGS = -module -avoid-version
distclean-local:
rm -f config.h

Просмотреть файл

@ -6,7 +6,9 @@
# Copyright (c) 2011-2015 INRIA. All rights reserved.
# Copyright (c) 2011-2015 Universite Bordeaux 1
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# Copyright (c) 2015 Intel, Inc. All rights reserved.
# Copyright (c) 2019 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
@ -77,7 +79,21 @@ AC_DEFUN([MCA_ompi_topo_treematch_CONFIG], [
[ompi_topo_treematch_happy=1])])])
AS_IF([test $ompi_topo_treematch_happy -eq 1],
[$1],
[AS_IF([test "x$treematch_files_local" = "xyes"],
[AS_IF([! test -d $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch],
[mkdir -p $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch])
cat > $OMPI_TOP_BUILDDIR/ompi/mca/topo/treematch/config.h << EOF
/*
* This file is automatically generated by configure. Edits will be lost
*
* This is an dummy config.h in order to prevent the embedded treematch from using
* the config.h from the embedded hwloc
*
* see https://github.com/open-mpi/ompi/pull/6185#issuecomment-458807930
*/
EOF
])
$1],
[AS_IF([test ! -z "$with_treematch" && test "$with_treematch" != "no"],
[AC_MSG_ERROR([TreeMatch support requested but not found. Aborting])])
$2])