As a bonus fix some warnings from GCC (wrong order of initialization in constructor) and improve formatting (unnecessary space at the end of the line).
I allowed optional build as a static library, may be useful if someone wants to embed your code into an executable (I was considering it myself).
I also disabled some warnings from GCC because I wasn't sure if it would make sense to fix them (one would require to add virtual modifier to two destructors, another was about #pragma region, not sure if it can be ifdefed and still work in MSVC - both warnings are not a real bugs so disabling them is okay IMO).
Also I used slightly different style of CMakeFile.txt than in your blink project:
cmake functions are lower-case because that's how cmake official documentation uses them (and I like it more)
file list is explicit (no glob) - it is better approach because when pulling changes that involve adding/removing files developer don't have to force CMake regeneration manually
As a bonus fix some warnings from GCC (wrong order of initialization in constructor) and improve formatting (unnecessary space at the end of the line). I allowed optional build as a static library, may be useful if someone wants to embed your code into an executable (I was considering it myself). I also disabled some warnings from GCC because I wasn't sure if it would make sense to fix them (one would require to add
virtual
modifier to two destructors, another was about#pragma region
, not sure if it can be ifdefed and still work in MSVC - both warnings are not a real bugs so disabling them is okay IMO). Also I used slightly different style of CMakeFile.txt than in your blink project: