Unable to detect Visual Studio C++ compiler standard
Dear PETSc team,
with current PETSc version 3.19.2 we get a configuration error when using VS 16 2019 as C++ compiler
./configure \
--with-shared-libraries=1 --with-cc="win32fe cl" --with-fc="win32fe ifort" --with-cxx="win32fe cl" \
--with-mpi-include=["${I_MPI_ROOT}/include"] --with-mpi-lib=["${I_MPI_ROOT}/lib/release/impi.lib"] \
--with-debugging=0 --COPTFLAGS="-O2" --CXXOPTFLAGS="-O2" --FOPTFLAGS="-O2" \
--with-x=0 --with-windows-graphics=0 \
--with-fortran-bindings=0 \
--with-blaslapack-include=["${MKLROOT}/include"] \
--with-blaslapack-lib=["${MKLROOT}/lib/intel64/mkl_intel_lp64.lib","${MKLROOT}/lib/intel64/mkl_sequential.lib","${MKLROOT}/lib/intel64/mkl_core.lib"]
[...]
TESTING: checkCxxDialect from config.setCompilers(config/BuildSystem/config/setCompilers.py:771)
*********************************************************************************************
UNABLE to CONFIGURE with GIVEN OPTIONS (see configure.log for details):
---------------------------------------------------------------------------------------------
C++ compiler
(/cygdrive/c/builds/grs/ac2/contribution/petsc/petsc-builder/petsc/lib/petsc/bin/win32fe/win32fe
cl) appears non-compliant with C++11 or didn't accept:
- -std=c++20
- -std=c++17
- -std=c++14
- -std=c++11
Note, you have explicitly requested --with-cxx=win32fe cl. If you don't need C++, or that
specific compiler, remove this flag -- configure may be able to find a more suitable
compiler automatically.
If you DO need the above, then consult your compilers user manual. It's possible you may
need to add additional flags (or perhaps load additional modules) to enable compliance
For VS it should be -std:c++14
instead of -std=c++14
May be related to #1232 (closed)
Thanks and kind regards, Volker