Skip to content
Snippets Groups Projects
Commit 60a138c5 authored by Paul Bauer's avatar Paul Bauer
Browse files

Disallow combination of gcc > 9 and IBM_VSX

The compiler flag is not detected for newer versions of gcc and can lead
to confusing error messages.

Fixes #3380

Change-Id: I0c5311325b2bf2bc08ab727eabd670115720b4a6
parent fa5a87d9
No related branches found
No related tags found
Loading
#
# This file is part of the GROMACS molecular simulation package.
#
# Copyright (c) 2012,2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
# Copyright (c) 2012,2013,2014,2015, The GROMACS development team.
# Copyright (c) 2016,2017,2018,2019,2020, by the GROMACS development team, led by
# Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
# and including many others, as listed in the AUTHORS file in the
# top-level source directory and at http://www.gromacs.org.
......@@ -263,6 +264,13 @@ elseif(GMX_SIMD_ACTIVE STREQUAL "IBM_VMX")
elseif(GMX_SIMD_ACTIVE STREQUAL "IBM_VSX")
# IBM_VSX and gcc > 9 do not work together, so we need to prevent people from
# choosing a combination that might fail. Issue #3380.
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "9")
message(FATAL_ERROR "IBM_VSX does not work together with gcc > 9. Disable SIMD support (slower), or use an older version of the GNU compiler")
endif()
gmx_find_simd_ibm_vsx_flags(SIMD_IBM_VSX_C_SUPPORTED SIMD_IBM_VSX_CXX_SUPPORTED
SIMD_IBM_VSX_C_FLAGS SIMD_IBM_VSX_CXX_FLAGS)
......
......@@ -83,6 +83,13 @@ The tool would fail with a segmentation fault.
Fixes that affect portability
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Give clearer message about not detecting IBM_VSX support in gcc > 9
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
CMake would fail with a confusing error message.
:issue:`3380`
Miscellaneous
^^^^^^^^^^^^^
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment