Sideport of OPM/opm-material@7298744 to opm-core

Incorporates the test for the auto keyword. This is currently not used by opm-core, and is just to align all the .cmake files across projects.