mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
cmake: fix HAVE_WRITABLE_ARGV
detection
Move detection before the creation of detection results in `curl_config.h`. Ref: #11964 (effort to sync cmake detections with autotools) Closes #11978
This commit is contained in:
parent
69aa8f6de4
commit
ca7daadd9b
@ -1255,6 +1255,18 @@ if(WIN32)
|
||||
unset(HAVE_WIN32_WINNT CACHE)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
|
||||
# on not-Windows and not-crosscompiling, check for writable argv[]
|
||||
include(CheckCSourceRuns)
|
||||
check_c_source_runs("
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
(void)argc;
|
||||
argv[0][0] = ' ';
|
||||
return (argv[0][0] == ' ')?0:1;
|
||||
}" HAVE_WRITABLE_ARGV)
|
||||
endif()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS)
|
||||
|
||||
option(ENABLE_WEBSOCKETS "Set to ON to enable EXPERIMENTAL websockets" OFF)
|
||||
|
@ -85,19 +85,6 @@ else()
|
||||
unset(CMAKESONAME)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
|
||||
# on not-Windows and not-crosscompiling, check for writable argv[]
|
||||
include(CheckCSourceRuns)
|
||||
check_c_source_runs("
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
(void)argc;
|
||||
argv[0][0] = ' ';
|
||||
return (argv[0][0] == ' ')?0:1;
|
||||
}"
|
||||
HAVE_WRITABLE_ARGV)
|
||||
endif()
|
||||
|
||||
## Library definition
|
||||
|
||||
# Add "_imp" as a suffix before the extension to avoid conflicting with
|
||||
|
Loading…
Reference in New Issue
Block a user