aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-05-27 14:17:23 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-05-28 14:19:45 +0200
commit8fa110847f7156c994dec9bce09be83ca46c148f (patch)
treedaec65793acac14ca5af3bea11998193f8aece51 /tests/auto
parent0f0d90485e591eb74e3f5b773e849aadba480088 (diff)
Fix "appWithoutSources" blackbox test for Windows.
The "main" symbol seems to lose its magic if it comes from a library, so tell the linker where the entry point is. For this purpose, use C instead of C++, so we won't have to deal with name mangling. Change-Id: Ia2c0714431a1b54ebcbba3d13851d4cfcf9a6c3e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/blackbox/testdata/appWithoutSources/a.c (renamed from tests/auto/blackbox/testdata/appWithoutSources/a.cpp)0
-rw-r--r--tests/auto/blackbox/testdata/appWithoutSources/b.c (renamed from tests/auto/blackbox/testdata/appWithoutSources/b.cpp)2
-rw-r--r--tests/auto/blackbox/testdata/appWithoutSources/project.qbs9
3 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/blackbox/testdata/appWithoutSources/a.cpp b/tests/auto/blackbox/testdata/appWithoutSources/a.c
index bf7759e11..bf7759e11 100644
--- a/tests/auto/blackbox/testdata/appWithoutSources/a.cpp
+++ b/tests/auto/blackbox/testdata/appWithoutSources/a.c
diff --git a/tests/auto/blackbox/testdata/appWithoutSources/b.cpp b/tests/auto/blackbox/testdata/appWithoutSources/b.c
index 76c93685d..e3841fa32 100644
--- a/tests/auto/blackbox/testdata/appWithoutSources/b.cpp
+++ b/tests/auto/blackbox/testdata/appWithoutSources/b.c
@@ -1,4 +1,4 @@
-#include <cstdio>
+#include <stdio.h>
int foo(); // defined in a.cpp
diff --git a/tests/auto/blackbox/testdata/appWithoutSources/project.qbs b/tests/auto/blackbox/testdata/appWithoutSources/project.qbs
index 983cc9bab..f59d3ad85 100644
--- a/tests/auto/blackbox/testdata/appWithoutSources/project.qbs
+++ b/tests/auto/blackbox/testdata/appWithoutSources/project.qbs
@@ -7,7 +7,7 @@ Project {
Depends { name: "cpp" }
files: [
- "a.cpp",
+ "a.c",
]
}
@@ -18,12 +18,17 @@ Project {
Depends { name: "cpp" }
files: [
- "b.cpp",
+ "b.c",
]
}
CppApplication {
name: "appWithoutSources"
+ Properties {
+ condition: qbs.toolchain.contains("msvc")
+ cpp.linkerFlags: "/ENTRY:main"
+ }
+
Depends { name: "a" }
Depends { name: "b" }
}