mirror of
https://github.com/curl/curl.git
synced 2026-07-24 18:17:16 +03:00
lib/cmake: add HAVE_WRITABLE_ARGV check
Assisted-by: Jakub Zakrzewski Closes #10896
This commit is contained in:
parent
7b95b6e983
commit
4838863d27
1 changed files with 11 additions and 0 deletions
|
|
@ -131,6 +131,17 @@ if(WIN32)
|
|||
set_target_properties(${LIB_NAME} PROPERTIES IMPORT_SUFFIX "_imp.lib")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
# on not-Windows, 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()
|
||||
|
||||
target_include_directories(${LIB_NAME} INTERFACE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue