Clean up CMakeLists in all C++ examples

+ Rename output executables to match directory structure
+ Remove libraries for small examples
+ Supress -Wreturn-type warnings for singleton that is intentionally not copyable
This commit is contained in:
2022-03-31 16:01:08 -04:00
parent 573fc4e1e8
commit a97dfbe34b
98 changed files with 695 additions and 598 deletions

View File

@@ -19,7 +19,13 @@ private:
ClassicSingleton(){ message = "New ClassicSingleton\n";}
// Do not allow copying of this object
ClassicSingleton(const ClassicSingleton&){}
// Ignore -Wreturn-type warnings; It's intentional for this pattern
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wreturn-type"
ClassicSingleton& operator=(const ClassicSingleton&){}
// Unmatched pop reverts GCC to commandline options
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop
// Static pointer to instance of this singleton
static ClassicSingleton* instance;