Skip to content

Commit 509dec3

Browse files
committed
Omit creating redundant local variable
1 parent a7d9424 commit 509dec3

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

cmake/ext/standard/cmake/CheckFclose.cmake

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,16 @@ cmake_push_check_state(RESET)
2727
check_symbol_exists(fclose stdio.h _PHP_HAVE_FCLOSE)
2828
cmake_pop_check_state()
2929

30-
if(_PHP_HAVE_FCLOSE)
31-
message(CHECK_PASS "found")
32-
set(result FALSE)
33-
else()
34-
message(CHECK_FAIL "missing")
35-
set(result TRUE)
36-
endif()
37-
3830
set(
3931
MISSING_FCLOSE_DECL
40-
${result}
32+
FALSE
4133
CACHE INTERNAL
4234
"Whether the 'fclose()' declaration is missing."
4335
)
36+
37+
if(_PHP_HAVE_FCLOSE)
38+
message(CHECK_PASS "found")
39+
else()
40+
message(CHECK_FAIL "missing")
41+
set_property(CACHE MISSING_FCLOSE_DECL PROPERTY VALUE TRUE)
42+
endif()

0 commit comments

Comments
 (0)