[Cmake] How to make Check*Exists modules include headers

Bradley Lowekamp blowekamp at mail.nih.gov
Wed, 19 May 2004 12:04:26 -0400


I only checked CheckTypeSize.cmake, CheckFunctionExists.cmake and 
CheckVariableExists.cmake, none of which had parameters for include 
files. It is not clear to my why there is the is a need for 
CheckFunctionExists.cmake and CheckVariableExists.cmake with this 
module here. But this module still does not fit what I need. Because I 
am checking for OpenGL functions an I need to be able to specify the 
include directories and link libraries. These seem like natural options 
that would be needed for these kinds of check functions. I managed to 
hack up the CheckTypesSize.cmake module to add additional parameters 
for these. I guess I have more hacking to do. The CMake MACRO command 
doesn't have optional parameters or default values for parameters?

Brad

>
> On May 19, 2004, at 11:20 AM, Brad King wrote:
>
>> Bradley Lowekamp wrote:
>>> I need to check if certain types, functions variables are defined in 
>>> a header (OpenGL actually). There seem to be some CMake modules that 
>>> are close to checking this but they don't seem to include any 
>>> parameters for including header files (and the needed libraries to 
>>> link too). Is there a way that I can use these modules to detect 
>>> these functions and variables in a non-standard header without 
>>> having to hack around in them?
>>
>> Look at the CheckSymbolExists.cmake module.
>>
>> -Brad
>>
>>
> ========================================================
> Bradley Lowekamp
> Management Systems Designers Contractor for
> Office of High Performance Computing and Communications
> National Library of Medicine
> 'blowekamp at mail.nih.gov
>