File tree Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Expand file tree Collapse file tree 2 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ example, in command-line scripts.
7575 cmake --build <dir> --target codegen
7676 ```
7777
78- * `WORKING_DIRECTORY <directory>` - The path where the `re2c ` is executed.
78+ * `WORKING_DIRECTORY <directory>` - The path where the `bison ` is executed.
7979 Relative `<directory>` path is interpreted as being relative to the current
8080 binary directory. If not set, `bison` is by default executed in the
8181 `PHP_SOURCE_DIR` when building the php-src repository. Otherwise it is
@@ -288,8 +288,15 @@ function(php_bison name input output)
288288
289289 _php_bison_config()
290290
291- # Skip consecutive calls if downloading or outer find_package() was called.
292- if (NOT TARGET Bison::Bison AND NOT DEFINED BISON_FOUND)
291+ if (
292+ # Skip consecutive find_package() calls when:
293+ # - project calls php_bison() multiple times and Bison will be downloaded:
294+ NOT TARGET Bison::Bison
295+ # - the outer find_package() was called prior to php_bison():
296+ AND NOT DEFINED BISON_FOUND
297+ # - running consecutive configuration phases:
298+ AND NOT BISON_EXECUTABLE
299+ )
293300 find_package (BISON ${PHP_BISON_VERSION} ${quiet} )
294301 endif ()
295302
Original file line number Diff line number Diff line change @@ -296,8 +296,15 @@ function(php_re2c name input output)
296296
297297 _php_re2c_config()
298298
299- # Skip consecutive calls if downloading or outer find_package() was called.
300- if (NOT TARGET RE2C::RE2C AND NOT DEFINED RE2C_FOUND)
299+ if (
300+ # Skip consecutive find_package() calls when:
301+ # - project calls php_re2c() multiple times and re2c will be downloaded:
302+ NOT TARGET RE2C::RE2C
303+ # - the outer find_package() was called prior to php_re2c():
304+ AND NOT DEFINED RE2C_FOUND
305+ # - running consecutive configuration phases:
306+ AND NOT RE2C_EXECUTABLE
307+ )
301308 find_package (RE2C ${PHP_RE2C_VERSION} ${quiet} )
302309 endif ()
303310
You can’t perform that action at this time.
0 commit comments