[CMake] problem with CHECK_FUNCTION_EXISTS() and CMAKE_REQUIRED_LIBRARY

Alexander Neundorf a.neundorf-work at gmx.net
Sat Jan 14 12:06:26 EST 2006


Hi, 
 
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 ? 
 
Bye 
Alex 
 

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++


More information about the CMake mailing list