Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cmake: fix smpi install dirs (absolute arg)
authorMillian Poquet <millian.poquet@inria.fr>
Thu, 15 Jul 2021 09:09:09 +0000 (11:09 +0200)
committerMillian Poquet <millian.poquet@inria.fr>
Thu, 15 Jul 2021 09:09:09 +0000 (11:09 +0200)
commit71f01e667577be1076646eb841e0a57bd5388545
treef7364a5061221888bfa0665f991ef5a066a3834b
parent16ddd15041acb761755f6b90373d85135db705ac
cmake: fix smpi install dirs (absolute arg)

Previous code assumed that the following variables were relative paths
- CMAKE_INSTALL_INCLUDEDIR
- CMAKE_INSTALL_LIBDIR

However, using absolute paths there is totally legal in CMake,
and doing so broke installed paths in smpicc/smpicxx.

Fix uses the CMAKE_INSTALL_FULL_<dir> variant instead,
which should work in this case and generally be more robust.

FULL variants exist since at least cmake-3.0.0 so it should be available
everywhere (cmake-3.0.0 was released on June 2014).

References:
- https://cmake.org/cmake/help/latest/command/install.html
- https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
CMakeLists.txt