Skip to content

Commit 8baa2a5

Browse files
authored
Merge pull request open-mpi#9075 from rhc54/topic/cpp
Don't require a C++ compiler
2 parents c7dfde3 + 5ee8edf commit 8baa2a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

config/ompi_setup_cxx.m4

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved.
1616
dnl Copyright (c) 2008-2020 Cisco Systems, Inc. All rights reserved.
1717
dnl Copyright (c) 2015-2016 Research Organization for Information Science
1818
dnl and Technology (RIST). All rights reserved.
19+
dnl Copyright (c) 2021 Nanook Consulting. All rights reserved.
1920
dnl $COPYRIGHT$
2021
dnl
2122
dnl Additional copyrights may follow
@@ -33,7 +34,6 @@ AC_DEFUN([OMPI_PROG_CXX],[
3334

3435
ompi_cxxflags_save="$CXXFLAGS"
3536
AC_PROG_CXX
36-
AC_PROG_CXXCPP
3737
CXXFLAGS="$ompi_cxxflags_save"
3838

3939
# Note: according to the Autoconf docs, if no C++ compiler is
@@ -43,13 +43,14 @@ AC_DEFUN([OMPI_PROG_CXX],[
4343
# https://www.open-mpi.org/community/lists/users/2013/02/21356.php,
4444
# which advises us to set Libtool precious variables to "no" if we
4545
# don't want Libtool to setup that language at all.
46-
AS_IF([test "x$CXX" = "x"], [CXX=no])
4746
set dummy $CXX
4847
ompi_cxx_argv0=[$]2
4948
OPAL_WHICH([$ompi_cxx_argv0], [OMPI_CXX_ABSOLUTE])
5049
AS_IF([test "x$OMPI_CXX_ABSOLUTE" = "x"],
5150
[CXX=no
52-
OMPI_CXX_ABSOLUTE=no])
51+
OMPI_CXX_ABSOLUTE=no],
52+
[ # If we did actually find a C++ compiler, find the C++ CPP
53+
AC_PROG_CXXCPP])
5354

5455
AC_DEFINE_UNQUOTED(OMPI_CXX, "$CXX", [OMPI underlying C++ compiler])
5556
AC_SUBST(OMPI_CXX_ABSOLUTE)

0 commit comments

Comments
 (0)