diff --git a/regtest/basic/rt-cregex-backward-compatibility/Makefile b/regtest/basic/rt-cregex-backward-compatibility/Makefile new file mode 100644 index 0000000000..3703b27cea --- /dev/null +++ b/regtest/basic/rt-cregex-backward-compatibility/Makefile @@ -0,0 +1 @@ +include ../../scripts/test.make diff --git a/regtest/basic/rt-cregex-backward-compatibility/config b/regtest/basic/rt-cregex-backward-compatibility/config new file mode 100644 index 0000000000..6db62fcce2 --- /dev/null +++ b/regtest/basic/rt-cregex-backward-compatibility/config @@ -0,0 +1,3 @@ +type=plumed +#this just tests that config will always return cregex as existing, for backward compatibility +arg="config has cregex" diff --git a/regtest/basic/rt-cregex-backward-compatibility/out.reference b/regtest/basic/rt-cregex-backward-compatibility/out.reference new file mode 100644 index 0000000000..092a566f04 --- /dev/null +++ b/regtest/basic/rt-cregex-backward-compatibility/out.reference @@ -0,0 +1 @@ +cregex on diff --git a/regtest/isdb/rt-Metainference-averaging/config b/regtest/isdb/rt-Metainference-averaging/config index ecf9c90e84..bf6f932c83 100644 --- a/regtest/isdb/rt-Metainference-averaging/config +++ b/regtest/isdb/rt-Metainference-averaging/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver # this is to test a different name arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/regtest/isdb/rt-jcoupling-string-type/config b/regtest/isdb/rt-jcoupling-string-type/config index ecf9c90e84..bf6f932c83 100644 --- a/regtest/isdb/rt-jcoupling-string-type/config +++ b/regtest/isdb/rt-jcoupling-string-type/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver # this is to test a different name arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/regtest/isdb/rt-metainference-mc-chunksize/config b/regtest/isdb/rt-metainference-mc-chunksize/config index ecf9c90e84..bf6f932c83 100644 --- a/regtest/isdb/rt-metainference-mc-chunksize/config +++ b/regtest/isdb/rt-metainference-mc-chunksize/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver # this is to test a different name arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/regtest/isdb/rt-metainference-optisigmamean-sem-max/config b/regtest/isdb/rt-metainference-optisigmamean-sem-max/config index ecf9c90e84..bf6f932c83 100644 --- a/regtest/isdb/rt-metainference-optisigmamean-sem-max/config +++ b/regtest/isdb/rt-metainference-optisigmamean-sem-max/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver # this is to test a different name arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/regtest/isdb/rt-metainference-optisigmamean-sem/config b/regtest/isdb/rt-metainference-optisigmamean-sem/config index ecf9c90e84..bf6f932c83 100644 --- a/regtest/isdb/rt-metainference-optisigmamean-sem/config +++ b/regtest/isdb/rt-metainference-optisigmamean-sem/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver # this is to test a different name arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/regtest/isdb/rt-metainference-regres-zero/config b/regtest/isdb/rt-metainference-regres-zero/config index ecf9c90e84..bf6f932c83 100644 --- a/regtest/isdb/rt-metainference-regres-zero/config +++ b/regtest/isdb/rt-metainference-regres-zero/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver # this is to test a different name arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/regtest/isdb/rt-metainferencebase-averaging/config b/regtest/isdb/rt-metainferencebase-averaging/config index ecf9c90e84..bf6f932c83 100644 --- a/regtest/isdb/rt-metainferencebase-averaging/config +++ b/regtest/isdb/rt-metainferencebase-averaging/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver # this is to test a different name arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/regtest/isdb/rt-metainferencebase-regres-zero/config b/regtest/isdb/rt-metainferencebase-regres-zero/config index dec4ec0c0d..147b050b4a 100644 --- a/regtest/isdb/rt-metainferencebase-regres-zero/config +++ b/regtest/isdb/rt-metainferencebase-regres-zero/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/regtest/isdb/rt-metainferencebase-sem-max/config b/regtest/isdb/rt-metainferencebase-sem-max/config index ecf9c90e84..bf6f932c83 100644 --- a/regtest/isdb/rt-metainferencebase-sem-max/config +++ b/regtest/isdb/rt-metainferencebase-sem-max/config @@ -1,4 +1,3 @@ -plumed_needs="cregex" type=driver # this is to test a different name arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f" diff --git a/src/config/Config.h b/src/config/Config.h index 1604c5bab6..4f225200b9 100644 --- a/src/config/Config.h +++ b/src/config/Config.h @@ -99,7 +99,8 @@ bool hasDlopen(); bool isInstalled(); -bool hasCregex(); +/// This will always return true for backward compatibility +constexpr bool hasCregex() {return true;} bool hasMolfile(); diff --git a/src/config/Config.inc.in b/src/config/Config.inc.in index 39ff6f0989..cb821b217e 100644 --- a/src/config/Config.inc.in +++ b/src/config/Config.inc.in @@ -155,14 +155,6 @@ bool hasDlopen() { #endif } -bool hasCregex() { -#ifdef __PLUMED_HAS_CREGEX - return true; -#else - return false; -#endif -} - bool hasMolfile() { #ifdef __PLUMED_HAS_MOLFILE_PLUGINS return true; diff --git a/src/maketools/update-config-txt.sh b/src/maketools/update-config-txt.sh index 198750e188..a55a863a60 100755 --- a/src/maketools/update-config-txt.sh +++ b/src/maketools/update-config-txt.sh @@ -132,6 +132,8 @@ echo "# if option xx is on then plumed has beeen compiled with -D__PLUMED_HAS_XX echo "has $u off" fi done + #this is here for backward compatibility (since we are using c++17 that has ) + echo "has cregex on" } | sort echo echo "# other defines"