This version of CMakeLists.txt follows the "modern cmake" way by setting properties directly on the target.
I also removed the -O2 from the flags as one should use the Release or RelWithDebInfo configurations to have optimized builds. This will also make it work across various compilers.
It will also use the correct flags for c++14 using any compiler.
This version of CMakeLists.txt follows the "modern cmake" way by setting properties directly on the target.
I also removed the
-O2
from the flags as one should use theRelease
orRelWithDebInfo
configurations to have optimized builds. This will also make it work across various compilers.It will also use the correct flags for c++14 using any compiler.