Skip to content

Commit d0a475f

Browse files
committed
Sync cache variable names
1 parent 6517caa commit d0a475f

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

cmake/cmake/checks/CheckAlignof.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
1515
endif()
1616

1717
# Skip in consecutive configuration phases.
18-
if(NOT DEFINED PHP_HAS_ALIGNOF)
18+
if(NOT DEFINED PHP_HAVE_ALIGNOF)
1919
message(CHECK_START "Checking whether the compiler supports __alignof__")
2020
cmake_push_check_state(RESET)
2121
set(CMAKE_REQUIRED_QUIET TRUE)
@@ -26,13 +26,13 @@ if(NOT DEFINED PHP_HAS_ALIGNOF)
2626
(void)align;
2727
return 0;
2828
}
29-
]] PHP_HAS_ALIGNOF)
29+
]] PHP_HAVE_ALIGNOF)
3030
cmake_pop_check_state()
31-
if(PHP_HAS_ALIGNOF)
31+
if(PHP_HAVE_ALIGNOF)
3232
message(CHECK_PASS "yes")
3333
else()
3434
message(CHECK_FAIL "no")
3535
endif()
3636
endif()
3737

38-
set(HAVE_ALIGNOF ${PHP_HAS_ALIGNOF})
38+
set(HAVE_ALIGNOF ${PHP_HAVE_ALIGNOF})

cmake/cmake/checks/CheckAlloca.cmake

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,21 @@ include(CheckSymbolExists)
2020
# On Windows, alloca is defined in malloc.h as _alloca. Cache variables are
2121
# overridden to speed up the check and commands used for documentation purposes.
2222
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
23-
set(PHP_HAS_ALLOCA_H FALSE)
24-
set(PHP_HAS_ALLOCA TRUE)
25-
check_symbol_exists(alloca malloc.h PHP_HAS_ALLOCA)
23+
set(PHP_HAVE_ALLOCA_H FALSE)
24+
set(PHP_HAVE_ALLOCA TRUE)
25+
endif()
26+
27+
check_include_files(alloca.h PHP_HAVE_ALLOCA_H)
28+
29+
if(PHP_HAVE_ALLOCA_H)
30+
# Most *.nix systems (Linux, macOS, Solaris/illumos, Haiku).
31+
check_symbol_exists(alloca alloca.h PHP_HAVE_ALLOCA)
32+
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
33+
check_symbol_exists(alloca malloc.h PHP_HAVE_ALLOCA)
2634
else()
27-
check_include_files(alloca.h PHP_HAS_ALLOCA_H)
28-
29-
if(PHP_HAS_ALLOCA_H)
30-
# Most *.nix systems (Linux, macOS, Solaris/illumos, Haiku).
31-
check_symbol_exists(alloca alloca.h PHP_HAS_ALLOCA)
32-
else()
33-
# BSD-based systems, old Linux.
34-
check_symbol_exists(alloca stdlib.h PHP_HAS_ALLOCA)
35-
endif()
35+
# BSD-based systems, old Linux.
36+
check_symbol_exists(alloca stdlib.h PHP_HAVE_ALLOCA)
3637
endif()
3738

38-
set(HAVE_ALLOCA ${PHP_HAS_ALLOCA})
39-
set(HAVE_ALLOCA_H ${PHP_HAS_ALLOCA_H})
39+
set(HAVE_ALLOCA ${PHP_HAVE_ALLOCA})
40+
set(HAVE_ALLOCA_H ${PHP_HAVE_ALLOCA_H})

cmake/cmake/checks/CheckCopyFileRange.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
1717
endif()
1818

1919
# Skip in consecutive configuration phases.
20-
if(NOT DEFINED PHP_HAS_COPY_FILE_RANGE)
20+
if(NOT DEFINED PHP_HAVE_COPY_FILE_RANGE)
2121
message(CHECK_START "Checking for copy_file_range")
2222

2323
cmake_push_check_state(RESET)
@@ -42,14 +42,14 @@ if(NOT DEFINED PHP_HAS_COPY_FILE_RANGE)
4242
(void)copy_file_range(-1, 0, -1, 0, 0, 0);
4343
return 0;
4444
}
45-
]] PHP_HAS_COPY_FILE_RANGE)
45+
]] PHP_HAVE_COPY_FILE_RANGE)
4646
cmake_pop_check_state()
4747

48-
if(PHP_HAS_COPY_FILE_RANGE)
48+
if(PHP_HAVE_COPY_FILE_RANGE)
4949
message(CHECK_PASS "yes")
5050
else()
5151
message(CHECK_FAIL "no")
5252
endif()
5353
endif()
5454

55-
set(HAVE_COPY_FILE_RANGE ${PHP_HAS_COPY_FILE_RANGE})
55+
set(HAVE_COPY_FILE_RANGE ${PHP_HAVE_COPY_FILE_RANGE})

0 commit comments

Comments
 (0)