optimad / bitpit

Open source library for scientific HPC
http://optimad.github.io/bitpit/
GNU Lesser General Public License v3.0
117 stars 34 forks source link

common: add message to deprecated macros #340

Closed edoardolombardi closed 1 year ago

edoardolombardi commented 1 year ago

Added new macro to define functions as deprecated with message as input argument.

With this new macros BITPIT_DEPRECATED_FOR (one for each supported compiler as the original ones) is possibile to pass a message to indicate wich method has to be used instead.

Currently compiled and tested only for GNUC case.

andrea-iob commented 1 year ago

Could you please also add "define BITPIT_DEPRECATED_FOR(func, replacement) func" in the else branch? This will allow unsupported compilers to still compile bitpit even if we don't explicitly define a deprecated macro for them.

andrea-iob commented 1 year ago

Since we are changing this part of the code, I changed the message displayed when deprecated macros are not implemented ad fixed the indentation.