cmake - show command line for a test

Alexander Neundorf neundorf at kde.org
Mon Feb 13 18:48:55 CET 2006


On Monday 13 February 2006 18:13, Christian Ehrlicher wrote:
> Alexander Neundorf schrieb:
> > Hi,
> >
...
> My problem is not that we have to check for getaddrinfo but that the
> test for "struct addrinfo" fails because the kdewin32 include paths
> aren't used during test compile (see my other mail)

I rearranged several things yesterday, and I can't test the windows stuff, so 
it is possible that I broke something.
The following code is in kdelibs/ConfigureChecks.cmake, add some debug output 
there to see the contents of KDEWIN32_INCLUDES. 

if (WIN32)
   set(CMAKE_REQUIRED_LIBRARIES ${KDEWIN32_LIBRARIES} )
   set(CMAKE_REQUIRED_INCLUDES  ${KDEWIN32_INCLUDES} )
endif (WIN32)

If the contents are not ok, check FindKDEWIN32.cmake and find out what is 
going wrong there.

If there everything is ok, check the file CheckFunctionExists.cmake. On my 
system it contains the following code:

IF(CMAKE_REQUIRED_INCLUDES)
   SET(CHECK_FUNCTION_EXISTS_ADD_INCLUDES
     "-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
ELSE(CMAKE_REQUIRED_INCLUDES)
   SET(CHECK_FUNCTION_EXISTS_ADD_INCLUDES)
ENDIF(CMAKE_REQUIRED_INCLUDES)
TRY_COMPILE(${VARIABLE}
...
   "${CHECK_FUNCTION_EXISTS_ADD_INCLUDES}"
   OUTPUT_VARIABLE OUTPUT)


For me this works. Try to find out what goes wrong with some debug output.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list