cmake: tidy up more value comparisons
- unquote numeric value.
- `NOT LESS` -> `GREATER_EQUAL`.
- replace macro with variable name.
It also avoids this error when the variable is undefined:
```
CMake Error at CMakeLists.txt:1529 (if):
if given arguments:
"GREATER" "4"
Unknown arguments specified
```
https://github.com/curl/curl/actions/runs/10289921657/job/28478722584#step:30:356
Follow-up to 72ae0d86a4 #14409
Follow-up to acbc6b703f #14197
Closes #14449
This commit is contained in:
parent
a3155db43d
commit
2d6fb0f58f
@ -1526,7 +1526,7 @@ set(CMAKE_REQUIRED_FLAGS)
|
||||
option(ENABLE_WEBSOCKETS "Set to ON to enable EXPERIMENTAL websockets" OFF)
|
||||
|
||||
if(ENABLE_WEBSOCKETS)
|
||||
if(${SIZEOF_CURL_OFF_T} GREATER "4")
|
||||
if(SIZEOF_CURL_OFF_T GREATER 4)
|
||||
set(USE_WEBSOCKETS ON)
|
||||
else()
|
||||
message(WARNING "curl_off_t is too small to enable WebSockets")
|
||||
|
||||
@ -38,7 +38,7 @@ function(add_manual_pages _listname)
|
||||
set(_eol "_EOL_")
|
||||
foreach(_file IN LISTS ${_listname} _eol)
|
||||
math(EXPR _file_count "${_file_count} + 1")
|
||||
if(NOT _file_count LESS ${_files_per_batch} OR _file STREQUAL "_EOL_")
|
||||
if(_file_count GREATER_EQUAL _files_per_batch OR _file STREQUAL "_EOL_")
|
||||
add_custom_command(OUTPUT ${_rofffiles}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND "${PERL_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/scripts/cd2nroff" -k -d "${CMAKE_CURRENT_BINARY_DIR}" ${_mdfiles}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user