[CMake] FindMPI.cmake in 3.11.4

Mateusz Loskot mateusz at loskot.net
Fri Sep 14 15:30:46 EDT 2018


On Fri, 14 Sep 2018 at 20:57, Burlen Loring <burlen.loring at gmail.com> wrote:
> why did they MPI_C_LIBRARIES and MPI_C_INCLUDE_DIRS/PATH get changed from cache variables to not chached variables?

Possibly, that change was due to clean up to correct the module
according to the actual CMake conventions

https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#standard-variable-names

"""
Xxx_INCLUDE_DIRS
  The final set of include directories listed in one variable for use
by client code. This should not be a cache entry.

Xxx_LIBRARIES
  The libraries to link against to use Xxx. These should include full
paths. This should not be a cache entry.
"""

Also, find_package_handle_standard_args description also gives similar
hint on the naming:

https://cmake.org/cmake/help/latest/module/FindPackageHandleStandardArgs.html
"""
Therefore these should typically be cache entries such as FOO_LIBRARY
and not output variables like FOO_LIBRARIES.
"""

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net


More information about the CMake mailing list