Skip to content

Commit 717fc45

Browse files
committed
Fix consecutive configuration phases
1 parent 4ce3624 commit 717fc45

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cmake/cmake/modules/FindPHP.cmake

+4-3
Original file line numberDiff line numberDiff line change
@@ -848,10 +848,11 @@ if(_phpRole STREQUAL "PROJECT" AND "Development" IN_LIST PHP_FIND_COMPONENTS)
848848
file(READ ${binaryDir}/config.h current)
849849
endif()
850850

851-
string(STRIP "${template}\n${current}" config)
852-
853851
# Finalize extension's config.h header file.
854-
file(CONFIGURE OUTPUT ${binaryDir}/config.h CONTENT "${config}\n")
852+
if(NOT current MATCHES "(#undef|#define) ${macro}")
853+
string(STRIP "${template}\n${current}" config)
854+
file(CONFIGURE OUTPUT ${binaryDir}/config.h CONTENT "${config}\n")
855+
endif()
855856
endfunction()
856857
endif()
857858

0 commit comments

Comments
 (0)