File tree 2 files changed +19
-5
lines changed
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.
75
75
cmake --build <dir> --target codegen
76
76
```
77
77
78
- * `WORKING_DIRECTORY <directory>` - The path where the `re2c ` is executed.
78
+ * `WORKING_DIRECTORY <directory>` - The path where the `bison ` is executed.
79
79
Relative `<directory>` path is interpreted as being relative to the current
80
80
binary directory. If not set, `bison` is by default executed in the
81
81
`PHP_SOURCE_DIR` when building the php-src repository. Otherwise it is
@@ -288,8 +288,15 @@ function(php_bison name input output)
288
288
289
289
_php_bison_config()
290
290
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
+ )
293
300
find_package (BISON ${PHP_BISON_VERSION} ${quiet} )
294
301
endif ()
295
302
Original file line number Diff line number Diff line change @@ -296,8 +296,15 @@ function(php_re2c name input output)
296
296
297
297
_php_re2c_config()
298
298
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
+ )
301
308
find_package (RE2C ${PHP_RE2C_VERSION} ${quiet} )
302
309
endif ()
303
310
You can’t perform that action at this time.
0 commit comments