Improved the CMakeLists.txt just slightly. Provided a default, weak-attributed main function into libdeepstate so that tests don't need to define them. The weak attribute means that any main function defined by libfuzzer will be a strong symbol and take over, so there won't be a conflict. Adjusted examples accordingly to omit now redundant conditionally-compiled main functions, as that leaked out too many underlying details.

This commit is contained in:
Peter Goodman
2018-09-27 16:45:08 -07:00
parent 42b7068e2b
commit b1da5d6d48
12 changed files with 40 additions and 67 deletions
-7
View File
@@ -63,10 +63,3 @@ TEST(OneOfExample, ProduceSixtyOrHigher) {
<< x << " is >= 60: " << " did " << choices << " from " << start;
}
}
#ifndef LIBFUZZER
int main(int argc, char *argv[]) {
DeepState_InitOptions(argc, argv);
return DeepState_Run();
}
#endif