[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] CheckIncludeFiles problem
From:       Yngve Inntjore Levinsen <yngve.levinsen () gmail ! com>
Date:       2012-02-02 21:14:04
Message-ID: 1446203.I5bLhj5mGQ () yngve-chakra
[Download RAW message or body]


Hi Micha,

Aha, thanks! That was more clever than I would expect, and it was the problem.
readline/history.h was dependent on stdio.h being include beforehand.

Just in case anyone else reads this mail in the future, here is a 
documentation on how to check an array of include files:
http://www.cmake.org/Wiki/CMake:How_To_Write_Platform_Checks
For instance:
CHECK_INCLUDE_FILES ("stdio.h;readline/history.h" HAVE_READLINE_HISTORY_H)

Cheers,
Yngve

On Torsdag 2. februar 2012 13.46.09, Micha Renner wrote:
> May be, there is an error when the compiler process the header file.
> During CHECK_INCLUDE_FILES CMake invokes the Compiler to check whether
> the header file works fines. In most cases reason is a missing
> additional header files (but not always).
> 
> So, check the log files of CMake in the binary directory of your
> project.
> 
> Greetings
> 
> Micha
> 
> 
> 
> 
> 
> Am Donnerstag, den 02.02.2012, 11:58 +0100 schrieb Yngve Inntjore
> 
> Levinsen:
> > Dear all,
> > 
> > I have a problem with CheckIncludeFiles that I cannot figure out. I'm
> > sure I'm just making a stupid mistake though, but I am unable to figure
> > out what. The following code is in CMakeLists.txt:
> > 
> > include(CheckIncludeFiles)
> > 
> > check_include_files("readline/history.h" HAVE_READLINE_HISTORY_H)
> > check_include_files("sys/select.h" HAVE_SYS_SELECT_H)
> > 
> > 
> > And both headers are installed on my system:
> > $ ls -lh /usr/include/sys/select.h /usr/include/readline/history.h
> > -rw-r--r-- 1 root root 9,9K 21.07.2011 04:40
> > /usr/include/readline/history.h -rw-r--r-- 1 root root 4,1K 26.10.2011
> > 20:03 /usr/include/sys/select.h
> > 
> > CMake only finds sys/select.h though, and I don't see the difference.
> > What might I be missing? I use cmake version 2.8.7.
> > 
> > Thanks!
> > 
> > Cheers,
> > Yngve
> > --
> > 
> > Powered by www.kitware.com
> > 
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> > 
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> > 
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic