The code for this recipe is available at https://github.com/dev-cafe/cmake-cookbook/tree/v1.0/chapter-09/recipe-02 and has an example mixing C++, C, and Fortran. The recipe is valid with CMake version 3.5 (and higher) and has been tested on GNU/Linux and macOS.
Recipe 4, Detecting the BLAS and LAPACK math libraries, in Chapter 3, Detecting External Libraries and Programs, showed how to detect BLAS and LAPACK linear algebra libraries, written in Fortran, and how to use them in C++ code. Here we will revisit this recipe, but this time from a different angle: focusing less on detecting the external libraries but rather discussing the aspect of mixing C++ and Fortran and the name mangling in more depth.