[cmake-developers] [CMake 0011565]: CHECK_{FUNCTION, LIBRARY}_EXISTS() macros need a way to specify function declaration
Mantis Bug Tracker
mantis at public.kitware.com
Thu Dec 2 16:35:32 EST 2010
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=11565
======================================================================
Reported By: Daniel R. Gomez
Assigned To:
======================================================================
Project: CMake
Issue ID: 11565
Category: CMake
Reproducibility: always
Severity: feature
Priority: normal
Status: new
======================================================================
Date Submitted: 2010-12-02 16:35 EST
Last Modified: 2010-12-02 16:35 EST
======================================================================
Summary: CHECK_{FUNCTION,LIBRARY}_EXISTS() macros need a way
to specify function declaration
Description:
I want to check for the existence of a library+function. On Windows, however,
the function must be declared using the WINAPI keyword (which is available after
#including<windows.h>) in order for the linker to find it. This keyword changes
the symbol that the linker looks for in a manner that cannot otherwise be
represented in valid C code, so there is no alternative to its use.
There is currently no way to shoehorn this keyword into the C file used by the
CHECK_{FUNCTION,LIBRARY}_EXISTS() macros, or otherwise to modify the trivial
"char foo();" function declaration therein; the best you can do is create a
custom C file and invoke TRY_COMPILE() yourself.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-12-02 16:35 Daniel R. GomezNew Issue
======================================================================
More information about the cmake-developers
mailing list