[LIBBATCH Configure Error on RHEL7.9 - Salome 9.11.0]

Hello,

I had an error on configure LIBBATCH on rhel7.9 :

“Target Batch” and “Target_LIBBATCH” requires dialect “CXX17” (with compiler extension) butch the compiler “GNU” does not support this.

I already type “scl enable devtoolset-8 – bash” to enable GCC and "source /opt/rh/devtoolset-8/enable

however I still had the error.

To resolve this error, i add the option “-DCMAKE_CXX_COMPILER=/opt/rh/devtoolset-8/root/usr/bin/gcc” in the file PROJECT/products/LIBBATCH.pyconf

I hope this helps people who have made the same error.

in principle you simply need to do as follows, and there is no need to add the extra CMAKE_CXX_COMPILER flag to cmake.

[root@6061c3eb04db ] scl enable devtoolset-8 bash
[root@6061c3eb04db ] gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-8/root/usr/libexec/gcc/x86_64-redhat-linux/8/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-8/root/usr --mandir=/opt/rh/devtoolset-8/root/usr/share/man --infodir=/opt/rh/devtoolset-8/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-8.3.1-20190311/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 8.3.1 20190311 (Red Hat 8.3.1-3) (GCC)

I have the same output of gcc -v and without the option that i provide, i had the error.