Our CMakeLists.txt will have to contain a custom command to extract the sources for the linear algebra wrapper library. Let us look at it in detail:
- We start with a familiar definition of the minimum CMake version, project name, and supported language:
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)project(recipe-03 LANGUAGES CXX Fortran)
- We pick the C++11 standard, as usual:
set(CMAKE_CXX_STANDARD 11)set(CMAKE_CXX_EXTENSIONS OFF)set(CMAKE_CXX_STANDARD_REQUIRED ON)
- It is then time to look for the BLAS and LAPACK libraries on our system:
find_package(BLAS REQUIRED)find_package(LAPACK REQUIRED)
- We declare a variable, wrap_BLAS_LAPACK_sources, to hold the names of the source files contained in the wrap_BLAS_LAPACK.tar.gz ...