Re: [cmake-developers] deprecate check_function_exists?

2017-01-13 Thread Stephen Sorley
Thanks Brad, I've created the merge request here:

https://gitlab.kitware.com/cmake/cmake/merge_requests/394

-Stephen Sorley

On Thu, Jan 12, 2017 at 9:44 AM, Brad King  wrote:

> On 01/11/2017 03:59 PM, Stephen Sorley wrote:
> > So, could check_function_exists() be explicitly deprecated in the
> > documentation in favor of check_symbol_exists()?
>
> Yes.  Please submit a MR with proposed documentation updates.
>
> There may still be use cases for the test that `check_function_exists`
> performs, so I don't want to add an actual deprecation warning to it.
> A documentation update will be fine though.
>
> Thanks,
> -Brad
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] deprecate check_function_exists?

2017-01-13 Thread Brad King
On 01/11/2017 03:59 PM, Stephen Sorley wrote:
> So, could check_function_exists() be explicitly deprecated in the
> documentation in favor of check_symbol_exists()?

Yes.  Please submit a MR with proposed documentation updates.

There may still be use cases for the test that `check_function_exists`
performs, so I don't want to add an actual deprecation warning to it.
A documentation update will be fine though.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] deprecate check_function_exists?

2017-01-11 Thread Stephen Sorley
There are two big issues with the check_function_exists() module that I've
run into, and that others have also encountered:

(1) It can't detect functions that are inlined in system headers or
specified as a #define macro. (see
https://cmake.org/pipermail/cmake-developers/2015-July/025766.html)

(2) For 32-bit Windows builds, it can't link against functions declared
with a different calling convention than __cdecl. Since the Win32 API uses
__stdcall, check_function_exists can't detect anything from libraries like
kernel.lib or ws2_32.lib. (see
https://cmake.org/pipermail/cmake/2008-April/021099.html)

The check_symbol_exists() module solves both of the above problems, and it
does verify that the function is available at link time (if the symbol
isn't a #define).

So, could check_function_exists() be explicitly deprecated in the
documentation in favor of check_symbol_exists()?  I think most users find
it natural to try using check_function_exists() first because of the name,
when they really should be using check_symbol_exists() for all of the use
cases I can think of.


Thanks!

Stephen Sorley
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers