Add condition based on file extension

40 views
Skip to first unread message

Puya

unread,
Feb 22, 2021, 4:10:12 AMFeb 22
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 AMFeb 22
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 AMFeb 22
to gyp-developer
Thanks
Reply all
Reply to author
Forward
0 new messages