[CMake] Bug with cmake's `--debug-trycompile' option?

Clark J. Wang dearvoid at gmail.com
Tue Dec 11 04:07:59 EST 2007


I have a CMakeLists.txt like this:

PROJECT(foo)

SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)

INCLUDE(CheckIncludeFile)

CHECK_INCLUDE_FILE(poll.h VAR1)
CHECK_INCLUDE_FILE(sys/event.h VAR2)

When I run `cmake .' it outputed like this:

-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for poll.h
-- Looking for poll.h - found
-- Looking for sys/event.h
-- Looking for sys/event.h - not found
-- Configuring done
-- Generating done
-- Build files have been written to:
/root/void/cmake/check_include_file/build

This is fine for `sys/event.h' is not available on my system. But when I run
`cmake --debug-trycompile .' it outputed like this:

debug trycompile on
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Check size of void*
-- Check size of void* - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Looking for poll.h
-- Looking for poll.h - found
-- Looking for sys/event.h
-- Looking for sys/event.h - found
-- Configuring done
-- Generating done
-- Build files have been written to:
/root/void/cmake/check_include_file/build

This time it said that `sys/event.h' was found! Anything wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071211/59fcd6c5/attachment.html


More information about the CMake mailing list