[CMake] include command

Michael Wild themiwi at gmail.com
Tue Oct 26 07:59:33 EDT 2010


Please always also reply to the list, such that other people can profit 
from the discussion.

I can't tell you whether you should keep the lines or comment them out, 
that really depends on what they do and whether the code relies on them. 
You'll have to give a bit more information...

Michael

On 10/26/2010 10:33 AM, sipxuser sipx wrote:
> Hi Michael Wild,
> Thank you very much for you kind and rapid reply.  Your answer is very 
> helpful.
> Your meaning is that the 'modulename' refers to modulename.cmake. But 
> I cannot find that file with extension '.cmake' at all. So, I guess I 
> should just comment these lines out. Do you think so?
> Michael HUANG
>
> On Tue, Oct 26, 2010 at 3:26 PM, Michael Wild <themiwi at gmail.com 
> <mailto:themiwi at gmail.com>> wrote:
>
>
>     On 26. Oct, 2010, at 1:02 , sipxuser sipx wrote:
>
>     > Dear all,
>     >
>     > I'm a newbie  of cmake, and have some troubles in using the
>     'include'
>     > command. I've already include the searching path into the env
>     veriable PATH.
>     > But each time running cmake, I always get follow error messages:
>     >
>     > CMake Error at CMakeLists.txt: xxx (include):
>     >  include could not find load file:
>     >   xxx_module
>     >
>     > Can anynone give some advices? Thanks in advance.
>     >
>     > Michael.
>
>     Well, the include command literally tries to include a file into
>     your CMakeLists.txt file. There are two modes:
>
>     INCLUDE(path/to/file.cmake)
>
>     This mode just includes the file named path/to/file.cmake. If the
>     path is not absolute, AFAIK it is relative to the directory
>     containing the current file being processed.
>
>     INCLUDE(modulename)
>
>     In this mode, where modulename is just a single name with no path
>     component and no extension, searches for the file modulename.cmake
>     in the directories listed in the variable CMAKE_MODULE_PATH.
>
>     I hope this helps, otherwise you'll have to provide more
>     information (e.g. what is it that you're trying to achieve, show
>     the relevant code, etc.)
>
>     Michael
>
>     --
>     There is always a well-known solution to every human problem --
>     neat, plausible, and wrong.
>     H. L. Mencken
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101026/6547f2b9/attachment.htm>


More information about the CMake mailing list