Review Request 115292: Do Configure Checks in the Correct Language

David Narváez david.narvaez at computer.org
Fri Jan 31 21:32:35 UTC 2014



> On Jan. 31, 2014, 6:31 p.m., Alex Merry wrote:
> > src/ConfigureChecks.cmake, lines 87-88
> > <https://git.reviewboard.kde.org/r/115292/diff/1/?file=240431#file240431line87>
> >
> >     Is this LANGUAGE stuff a cmake 3 feature, because it does not appear to exist in cmake 2.8.12

 $ cmake --help-module CheckStructHasMember
CheckStructHasMember
--------------------

Check if the given struct or class has the specified member variable

::

 CHECK_STRUCT_HAS_MEMBER(<struct> <member> <header> <variable>
                         [LANGUAGE <language>])

::

 <struct> - the name of the struct or class you are interested in
 <member> - the member which existence you want to check
 <header> - the header(s) where the prototype should be declared
 <variable> - variable to store the result
 <language> - the compiler to use (C or CXX)

The following variables may be set before calling this macro to modify
the way the check is run:

::

 CMAKE_REQUIRED_FLAGS = string of compile command line flags
 CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
 CMAKE_REQUIRED_INCLUDES = list of include directories
 CMAKE_REQUIRED_LIBRARIES = list of libraries to link

Example: CHECK_STRUCT_HAS_MEMBER("struct timeval" tv_sec sys/select.h
HAVE_TIMEVAL_TV_SEC LANGUAGE C)


$ cmake --version
cmake version 2.8.12.20140128-g2dfb5

CMake suite maintained by Kitware, Inc. (kitware.com).


> On Jan. 31, 2014, 6:31 p.m., Alex Merry wrote:
> > src/ConfigureChecks.cmake, line 89
> > <https://git.reviewboard.kde.org/r/115292/diff/1/?file=240431#file240431line89>
> >
> >     This one doesn't even have an argument to LANGUAGE; but CheckPrototypeExists actually already checks using C++

Fixed locally. I was adding arguments to all calls when I noticed this one didn't need it but erased just the second argument, my bad.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115292/#review48694
-----------------------------------------------------------


On Jan. 24, 2014, 1:55 p.m., David Narváez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115292/
> -----------------------------------------------------------
> 
> (Updated Jan. 24, 2014, 1:55 p.m.)
> 
> 
> Review request for KDE Frameworks and Alex Merry.
> 
> 
> Repository: kde4support
> 
> 
> Description
> -------
> 
> A recent change in ECM revealed an issue with ConfigureChecks.cmake, where the check_symbol_exist calls would use the C compiler (with CFLAGS) and the compilation would happen in C++ (with CXXFLAGS). This change ports all checks to CXX where possible.
> 
> 
> Diffs
> -----
> 
>   src/ConfigureChecks.cmake 7c8951f 
> 
> Diff: https://git.reviewboard.kde.org/r/115292/diff/
> 
> 
> Testing
> -------
> 
> 1. Refreshed builds for ECM and KDE4Support, both building OK
> 2.  $ grep HAVE_GETADDRINFO src/config-network.h 
> #define HAVE_GETADDRINFO 1
> 
> 
> Thanks,
> 
> David Narváez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140131/b3d00480/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list