[CMake] How to Determine If a Perl Module Is Installed?

Eric Eide eeide at cs.utah.edu
Mon May 23 18:30:37 EDT 2016


Hi!  I am a CMake newbie, and I have a question about examining the set of
available Perl modules on a system.

In CMake (version 2.8.12+), how can I test for the presence of a particular
Perl module, e.g., "Sys::CPU"?

At the time that CMake is run, I would like to check for the presence of
various Perl modules.  (These are Perl modules that will eventually be needed
when the programs in my project are run, but that are not needed to configure,
compile, or install my software as a whole.)  If a needed Perl module is not
available, I want to issue a CMake-time warning or error.

I've Googled around for an answer, and also looked in the archives of this list
for the past year, without finding an answer.  (This makes me wonder if my
question is somehow wrong-headed, since I would expect that checking for Perl
modules for be a fairly common thing to do!)

I am already using CMake's FindPerl module to find the Perl interpreter itself.

Thanks! ---

Eric.

-- 
-------------------------------------------------------------------------------
Eric Eide <eeide at cs.utah.edu>  .         University of Utah School of Computing
http://www.cs.utah.edu/~eeide/ . +1 (801) 585-5512 voice, +1 (801) 581-5843 FAX


More information about the CMake mailing list