mirror of
https://github.com/curl/curl.git
synced 2025-09-09 13:49:44 +03:00
cmake: append picky warnings to CMAKE_REQUIRED_FLAGS
as string
Also:
- drop unnecessary type conversion. `CMAKE_REQUIRED_FLAGS` is already
space-separated.
https://cmake.org/cmake/help/latest/module/CheckCSourceCompiles.html
Follow-up to e86542038d
#17047
Closes #17055
This commit is contained in:
parent
4e203f65a1
commit
111b58fbb6
|
@ -40,7 +40,6 @@ set(CURL_TEST_DEFINES "") # Initialize global variable
|
|||
# Return result in variable: CURL_TEST_OUTPUT
|
||||
macro(curl_internal_test _curl_test)
|
||||
if(NOT DEFINED "${_curl_test}")
|
||||
string(REPLACE ";" " " _cmake_required_flags "${CMAKE_REQUIRED_FLAGS}")
|
||||
string(REPLACE ";" " " _cmake_required_definitions "${CMAKE_REQUIRED_DEFINITIONS}")
|
||||
set(_curl_test_add_libraries "")
|
||||
if(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
@ -53,7 +52,7 @@ macro(curl_internal_test _curl_test)
|
|||
${PROJECT_BINARY_DIR}
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/CurlTests.c"
|
||||
CMAKE_FLAGS
|
||||
"-DCOMPILE_DEFINITIONS:STRING=-D${_curl_test} ${CURL_TEST_DEFINES} ${_cmake_required_flags} ${_cmake_required_definitions}"
|
||||
"-DCOMPILE_DEFINITIONS:STRING=-D${_curl_test} ${CURL_TEST_DEFINES} ${CMAKE_REQUIRED_FLAGS} ${_cmake_required_definitions}"
|
||||
"${_curl_test_add_libraries}"
|
||||
OUTPUT_VARIABLE CURL_TEST_OUTPUT)
|
||||
if(${_curl_test})
|
||||
|
|
|
@ -298,7 +298,7 @@ if(_picky)
|
|||
# Apply to all feature checks
|
||||
list(REMOVE_ITEM _picky "-pedantic-errors") # Must not pass to feature checks
|
||||
string(REPLACE ";" " " _picky_tmp "${_picky}")
|
||||
list(APPEND CMAKE_REQUIRED_FLAGS "${_picky_tmp}")
|
||||
string(APPEND CMAKE_REQUIRED_FLAGS " ${_picky_tmp}")
|
||||
|
||||
unset(_picky)
|
||||
unset(_picky_tmp)
|
||||
|
|
Loading…
Reference in New Issue
Block a user