-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
#endif What 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
#endif I 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
MATCHES
expression by avoiding macros expansion andadding quotes. Then convert then to
STREQUAL
to match other placesin the code doing the same checks.
fix setting
_ALL_SOURCE
for AIX to match what autotools does.delete stray
_ALL_SOURCE
reference fromlib/config_riscos.h
simplify/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_SYSROOT
was undefined.delete code for CMake versions (<3.7) we no longer support.
prefer
LIST(APPEND ...)
to extendCURL_LIBS
.use
CURL_LIBS
to add thenetwork
lib 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
WIN32
blocks.rename internal variables to underscore + lowercase.
unwrap a line, indent, whitespace.
Closes #14450