Add condition based on file extension

79 views
Skip to first unread message

Puya

unread,
Feb 22, 2021, 4:10:12 AM2/22/21
to gyp-developer

Hi, is there a way to add a condition based on file extension in GYP? I tried this:
```
'cflags': [
  '-fPIC',
  '-Wall',
  '-W',
  '-Wno-unused-parameter',
  '-std=c++17',
],

'conditions': [
  [ 'RULE_INPUT_EXT == "c"', {
    'cflags!': [
      '-std=c++17',
    ],
  } ],
  ...

```
To no avail.

guin...@gmail.com

unread,
Feb 22, 2021, 5:00:23 AM2/22/21
to gyp-developer
Hi, just use `cflags_cc` for C++ files.

понедельник, 22 февраля 2021 г. в 12:10:12 UTC+3, Puya:

Puya

unread,
Feb 22, 2021, 5:08:45 AM2/22/21
to gyp-developer
Thanks
Reply all
Reply to author
Forward
0 new messages