Skip to content

Commit

Permalink
test: check that our workaround for ../<(CONFIGURATION_NAME) is safe
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed Feb 16, 2017
1 parent 6f61e63 commit 17e5b8a
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/gyppies/configuration_name_hack/dep/dep.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int x() {
return 42;
}
19 changes: 19 additions & 0 deletions test/gyppies/configuration_name_hack/dep/dep.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"targets": [{
"target_name": "copy_dep",
"type": "none",
"copies": [{
"destination": "<(PRODUCT_DIR)",
"files": [
"dep.c",
],
}],
}, {
"target_name": "dep",
"type": "static_library",
"dependencies": [ "copy_dep" ],
"sources": [
"../<(CONFIGURATION_NAME)/dep.c",
],
}],
}
3 changes: 3 additions & 0 deletions test/gyppies/configuration_name_hack/dep2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int y() {
return 42;
}
6 changes: 6 additions & 0 deletions test/gyppies/configuration_name_hack/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
int x();
int y();

int main() {
return (x() == 42 && y() == 42) ? 0 : 1;
}
20 changes: 20 additions & 0 deletions test/gyppies/configuration_name_hack/test.gyp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"targets": [{
"target_name": "copy_dep2",
"type": "none",
"copies": [{
"destination": "<(PRODUCT_DIR)",
"files": [
"dep2.c",
],
}],
}, {
"target_name": "test",
"type": "executable",
"dependencies": [ "dep/dep.gyp:dep", "copy_dep2" ],
"sources": [
"out/<(CONFIGURATION_NAME)/dep2.c",
"main.c",
],
}],
}

0 comments on commit 17e5b8a

Please sign in to comment.