On Jun 05, 2013, at 04:14 PM, Brad King <brad.k...@kitware.com> wrote:

Before working on a patch, can you explain why the current
check is "practically useless"?

I actually don't see the function in the current tree.  Maybe someone else already realized how bad it was.. ;)
Looks like it was maybe replaced with CheckPrototypeDefinition().

This version from a search looks like what I ran into: http://svn.osgeo.org/geos/trunk/cmake/modules/CheckPrototypeExists.cmake

The issues were a) the assumption of a C++ compiler, b) an unused variable 'i' causing all tests to fail, and c) ignoring preprocessor symbols.  The first caused wrong flags -- our C files don't compile with the same standard/warning/strict flags as our C++ files.  The second is, again, because we are specifically testing whether symbols are available/working under strict pedantic compilation conditions, so the unused var made nearly all tests fail.  The last was a converse surprise, a "#define symbol noexist" test passed that should not have.

That's where "(void)symbol;" is a beautiful hack.  Does pretty much nothing but check that a header declared that symbol appropriately.

While not ideal, they are not "wrong" names.

Certainly not wrong, just rather ambiguous and (now recently) overlapping in purpose.  Since those are such fundamental functions to build system testing, I'd think you'd want them to be as clear purposed as possible with forethought into their names and how they interwork as an API.

Those names are no better IMO. We won't be changing the names.

You apparently already did.  Hint of cynicism notwithstanding, the notion was to name them such that their differences are clear as is their implicit grouping.  The current names group well via the Exists suffix, but are ambiguous/inconsistent in what it means to exist.

Certainly you'd agree they are not perfect, could be better.  I'm just trying to help.  If you just don't want to think about how to change them right now for the better, so be it. There probably was a more tactful way to convey that.

Sean

--

Powered by www.kitware.com

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

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

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

Reply via email to