Update cmake to support FetchContent_Declare
To include PMT using FetchContent_Declare
quite a number of CMake changes were needed to work around the different structure of header files in the source directory and in the installation directory. The current solution is to recreate the structure that would be created upon installation in the binary directory at CMake configure time.
Additionally, a new option PMT_BUILD_TESTS
was added (on by default). The *Test
binaries are not needed when integrating PMT, so now they can be disabled.
In a follow-up MR, one might want to reorganize the header files in the PMT source. Also, it would be nicer if PMT would be compatible with modules to support e.g. find_package(pmt COMPONENTS nvml rapl)
.
Edited by Bram Veenboer