Notes |
|
(0024777)
|
David Cole
|
2011-01-17 12:57
|
|
I suggest invoking try_compile yourself with exactly the right details according to what you're looking for.
Do you have a suggestion for making this a more general purpose facility? A concrete proposed patch, including documentation and testing...?
Are you currently using a home-made CMake macro or function of any sort? |
|
|
(0024781)
|
Daniel Richard G.
|
2011-01-17 13:17
(edited on: 2011-01-17 13:20) |
|
I'm using try_compile() directly at the moment, but it seems silly to have to do that when all you want to change is a small part of the function declaration.
What about a new variable that can be set before calling the function to modify the declaration? Where you could do e.g.
set(CMAKE_REQUIRED_DECLARATION "WINAPI int")
and that gets used in the C code instead of "char"?
Of course, that would also need the Windows header... maybe something like
set(CMAKE_REQUIRED_PREAMBLE "#ifdef WIN32\n#include<windows.h>\n#endif")
as well?
|
|
|
(0025820)
|
Brad King
|
2011-03-18 14:11
|
|
|
|
(0025823)
|
Daniel Richard G.
|
2011-03-18 14:41
|
|
In my particular case, I'm checking for a function in a library for which no header file is available. (I.e. the consuming code provides the prototype.)
A link stage is still necessary, especially here when it's with a non-default ABI. |
|
|
(0041767)
|
Kitware Robot
|
2016-06-10 14:28
|
|
Resolving issue as `moved`.
This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
|