cmake: more small tidy-ups and fixes#14450
Conversation
- delete it from the macro. It seems to always check out TRUE. - replace with simple boolean check which doesn't check out TRUE if the variable is undefined, unlike STREQUAL. Closes #xxxxx
This also moves detection to the top, allowing all code to use the result.
|
This odd AIX construct is also generated by autoreconf into /* Define to 1 if OS is AIX. */
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endifWhat may be the purpose of this code? Besides, autotools (like CMake after this PR) does define |
|
The AIX 7.1 headers do things like defining _XOPEN_SOURCE to 700,
_POSIX_C_SOURCE to 200809L, setting _LARGE_FILE_API and a few more defines when
it sees _ALL_SOURCE. So, it looks similar to what glibc does for
_DEFAULT_SOURCE.
|
|
Thanks Dan. Do you know what purpose the |
|
Ah OK, I think I get it, autotools converts the odd construct to this, when defined: /* Define to 1 if OS is AIX. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endifI still cannot test it, but the CMake method of passing Probably making it |
Follow-up to 919394e curl#14450 Closes #xxxxx
|
All the AIX references to You should get yourself a Compile Farm account to help with this kind of testing. They have two different AIX versions available as well as other obscure machines. |
|
Thanks, they answer the questions and I've closed #14461 as not necessary. Also for the AIX tip! |
tidy up two
MATCHESexpression by avoiding macros expansion andadding quotes. Then convert then to
STREQUALto match other placesin the code doing the same checks.
fix setting
_ALL_SOURCEfor AIX to match what autotools does.delete stray
_ALL_SOURCEreference fromlib/config_riscos.hsimplify/fix two
STREQUAL ""checks.The one in the
openssl_check_symbol_exists()macro succeededregardless of the value. The other could return TRUE when
CMAKE_OSX_SYSROOTwas undefined.delete code for CMake versions (<3.7) we no longer support.
prefer
LIST(APPEND ...)to extendCURL_LIBS.use
CURL_LIBSto add thenetworklib for Haiku.Before this patch it was done via raw C flags. I could not test this.
move
_WIN32_WINNT-related code next to each other.It also moves detection to the top, allowing more code to use
the result.
merge two
WIN32blocks.rename internal variables to underscore + lowercase.
unwrap a line, indent, whitespace.
Closes #14450