Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: test/conditions/elseif/elseif.gyp

Issue 601353002: Add support for "else if" in gyp conditions (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/conditions/elseif/elseif.gyp
diff --git a/test/conditions/elseif/elseif.gyp b/test/conditions/elseif/elseif.gyp
new file mode 100644
index 0000000000000000000000000000000000000000..8d0e05a6d194dd3a209fd5dde540a834737c54e7
--- /dev/null
+++ b/test/conditions/elseif/elseif.gyp
@@ -0,0 +1,31 @@
+# Copyright (c) 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'test_var%': 0,
+ },
+ 'targets': [
+ {
+ 'target_name': 'program',
+ 'type': 'executable',
+ 'sources': [
+ 'program.cc',
+ ],
+ 'conditions': [
+ ['test_var==0', {
+ 'defines': ['FOO="first_if"'],
+ }, 'test_var==1', {
scottmg 2014/11/14 17:09:44 I applaud the effort to make elseifs better, but w
Shezan Baig (Bloomberg) 2014/11/14 17:25:44 This is true. In our code, we've been using this
+ 'defines': ['FOO="first_else_if"'],
+ }, 'test_var==2', {
+ 'defines': ['FOO="second_else_if"'],
+ }, 'test_var==3', {
+ 'defines': ['FOO="third_else_if"'],
+ }, {
+ 'defines': ['FOO="last_else"'],
+ }],
+ ],
+ },
+ ],
+}

Powered by Google App Engine
This is Rietveld 408576698