[CMake] problem with CHECK_FUNCTION_EXISTS()
and CMAKE_REQUIRED_LIBRARY
Brad King
brad.king at kitware.com
Sun Jan 15 11:14:23 EST 2006
Alexander Neundorf wrote:
> I want to check for a function which isn't part of libc, but of libutil.
> I tried this:
>
> INCLUDE(CheckFunctionExists)
> SET(CMAKE_REQUIRED_LIBRARIES util)
> CHECK_FUNCTION_EXISTS(openpty "" HAVE_OPENPTY)
> #SET(CMAKE_REQUIRED_LIBRARIES) # should I reset it here again ?
> MESSAGE(STATUS "have_openpty: ${HAVE_OPENPTY}")
>
> But this produces the following output:
>
> ~/src/tests/crypt$ cmake .
> -- Looking for openpty
> CMake Error: The source directory "CMAKE_FLAGS" does not exist.
> Specify --help for usage, or press the help button on the CMake GUI.
> CMake Error: Internal CMake error, TryCompile configure of cmake failed
> -- Looking for openpty - not found
> -- have_openpty:
> -- Configuring done
> ~/src/tests/crypt$
>
> What am I doing wrong here ?
I think this may be a bug. Please file a report, and also include in
the entry a request for better testing of the modules.
Thanks,
-Brad
More information about the CMake
mailing list