Tests: Ensure Solaris linker never sees empty contents

Fixes the following tests on Solaris builds: wrapping, qtwrapping and
CMakeCommands.target_link_libraries
This commit is contained in:
Craig Scott
2017-05-18 10:01:17 +10:00
committed by Craig Scott
parent 4717797647
commit 1bfe37201a
2 changed files with 6 additions and 2 deletions
@@ -1 +1,3 @@
// No content // Solaris needs non-empty content so ensure
// we have at least one symbol
int Solaris_requires_a_symbol_here = 0;
+3 -1
View File
@@ -6,7 +6,9 @@ int main(int ac, char** av)
if (strcmp(av[i], "-o") == 0 || strcmp(av[i], "-h") == 0) { if (strcmp(av[i], "-o") == 0 || strcmp(av[i], "-h") == 0) {
fprintf(stdout, "fakefluid is creating file \"%s\"\n", av[i + 1]); fprintf(stdout, "fakefluid is creating file \"%s\"\n", av[i + 1]);
FILE* file = fopen(av[i + 1], "w"); FILE* file = fopen(av[i + 1], "w");
fprintf(file, "// hello\n"); fprintf(file, "// Solaris needs non-empty content so ensure\n"
"// we have at least one symbol\n"
"int Solaris_requires_a_symbol_here = 0;\n");
fclose(file); fclose(file);
} }
} }